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)

Reply via email to