It seems that we can enter this state if broker executes 
`registerControllerAndIncrementControllerEpoch()` and finds that the controller 
znode has already been created by itself. Is this state possible?

Previously if broker tries to create controller znode and node already exists, 
the broker will simply read the controller id from the controller znode and 
move on. This patches added quite a few new logic in 
`controllerNodeExistsHandler()`, e.g. uses zk session id to detect whether the 
controller znode is created by this broker, handles the scenario that the 
controller znode is created by this broker. So the new code is more complicated 
than the previous version. Can you explain a bit why we need these new logic?


[ Full content available at: https://github.com/apache/kafka/pull/5101 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to