Alyssa Huang created KAFKA-19319:
------------------------------------

             Summary: Don't reset election timeout for prospective on 
transition to prospectiveVoted
                 Key: KAFKA-19319
                 URL: https://issues.apache.org/jira/browse/KAFKA-19319
             Project: Kafka
          Issue Type: Improvement
            Reporter: Alyssa Huang


The original argument is that we reset the election timeout after a node grants 
a vote to another candidate to prevent the following scenario:

T1 - unattached A receives vote request from candidate B in epoch X
T2 - unattached A grants vote for candidate B in epoch X
T3 - unattached A's election timer expires, transitions to candidate with 
bumped epoch X + 1 and disrupts the chance of candidate B winning election in 
epoch X

As part of Pre-Vote, we copied this logic for when unattached/prospective 
grants a vote to a candidate - but we can see from the above example if node A 
was in unattached/prospective state instead, on expiry of the election timeout 
it would just transition to a state with the same epoch which is 
non-disruptive. 

We can remove resetting the election timeout (and fix corresponding tests) for 
both the unattachedAddVotedState and prospectiveAddVotedState methods.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to