1. Because we first get /controller and then get /controller_epoch (rather than 
do it atomically), it is possible that after we see `controllerId == 
curControllerId` and before we get /controller_epoch, another round of 
controller election is triggered. In this case, we will see `epoch != 
newControllerEpoch`.
2. When we see `epoch != newControllerEpoch`, `controllerId == curControllerId` 
does not hold because another broker must become the controller. In this case, 
`maybeResign` will work fine.

[ 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