Since `KafkaController.incrementControllerEpoch()` will always print 
controllerContext.epochZkVersion, the only extra information we are seeking 
here is the current zkversion of the controller epoch znode. It seems that we 
only need this information when the broker observes ControllerMovedException 
when it thinks it is controller. Since `Reelect` is triggered in every broker 
every time there is controller movement, it may not be very intuitive or 
necessary to print the extra log here in `Relect.process()`.

Another thing to note that that we would like to know the zkversion of the 
controller epoch znode that causes the ControllerMovedException, but this zk 
version may have changed after the controller observes ControllerMovedException 
but before the controller processes Reelect event. So it is better to read the 
zkversion earlier (e.g. in `ControllerEventThread.doWork()`) than later. The 
best solution is probably to include the expected zkversion in the message of 
`ControllerMovedException` thrown by `maybeThrowControllerMoveException()`.

[ 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