There are a few remaining cleanup items from
KAFKA-1356 for trunk.
1. There is no need to call ensureTopicExists(). A consistent check would require holding the read lock of metadata cache on every fetch/producer request, which means a metadata update could block all fetch/producer requests. Also, this call is just an optimization. When leaderAndIsrRequest is propagated after a topic deletion, fetch/producer requests will be rejected by the ReplicaManager.
2. The update of the controller epoc when handling metadata request needs to be done inside the replicaStateChangeLock.