You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Gustafson (Jira)" <ji...@apache.org> on 2020/10/29 18:10:00 UTC

[jira] [Created] (KAFKA-10661) Add resigned state to raft state machine to preserve leader/epoch information

Jason Gustafson created KAFKA-10661:
---------------------------------------

             Summary: Add resigned state to raft state machine to preserve leader/epoch information
                 Key: KAFKA-10661
                 URL: https://issues.apache.org/jira/browse/KAFKA-10661
             Project: Kafka
          Issue Type: Sub-task
            Reporter: Jason Gustafson
            Assignee: Jason Gustafson


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)