I have two questions here:

1) When would we enter a scenario that `controllerId == curControllerId` and 
`epoch != newControllerEpoch)`?

2) Currently when this happens, `checkControllerAndEpoch` will throw 
`ControllerMovedException()`, which is caught in `KafkaController.elect()` and 
trigger `maybeResign()`. However `maybeResign()` will do nothing because 
`controllerId == curControllerId` and this broker is considered to be the 
active controller. In this case no other broker will be controller. And the 
current broker will not function properly as controller because it has not 
executed `onControllerFailover()`.

So maybe we should throw `IllegalStateException` here if `controllerId == 
curControllerId` and `epoch != newControllerEpoch)`?

[ 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