Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
While working on KAFKA-10655, I realized we have a bug in the existing raft state initialization logic when the process shuts down as leader. After reinitializing, we retain the current epoch, but we discard the current leader status. This means that it is possible for the node to vote for another node in the same epoch that it was the leader of.
To fix this problem I think we should add a separate "resigned" state. When re-initializing after being shutdown as leader, we can enter the "resigned" state. This prevents us from voting for another candidate while still ensuring that a new election needs to be held.
Attachments
Issue Links
- links to