You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "José Armando García Sancio (Jira)" <ji...@apache.org> on 2025/05/22 14:34:00 UTC

[jira] [Updated] (KAFKA-19319) Don't reset election timeout for prospective on transition to prospectiveVoted

     [ https://issues.apache.org/jira/browse/KAFKA-19319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

José Armando García Sancio updated KAFKA-19319:
-----------------------------------------------
    Issue Type: Bug  (was: Improvement)

> 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: Bug
>            Reporter: Alyssa Huang
>            Priority: Minor
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> 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)