You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2022/10/05 02:51:00 UTC

[jira] [Created] (KAFKA-14280) quorum election random backoff always return 0 for 1st timeout

Luke Chen created KAFKA-14280:
---------------------------------

             Summary: quorum election random backoff always return 0 for 1st timeout
                 Key: KAFKA-14280
                 URL: https://issues.apache.org/jira/browse/KAFKA-14280
             Project: Kafka
          Issue Type: Bug
          Components: kraft
    Affects Versions: 3.3.1
            Reporter: Luke Chen
            Assignee: Luke Chen


When doing quorum election, we added a random election backoff if vote got rejected or timeout, and hope next round, there will be no conflict between different voters. But we currently, we calculate the random backoff by:

 
{code:java}
Math.min(RETRY_BACKOFF_BASE_MS * random.nextInt(2 << Math.min(20, retries - 1)),
        raftConfig.electionBackoffMaxMs());{code}
 

That means, when multiple candidates tried to backoff for the 1st retries, they will all get 0ms backoff, and then keep conflicting again.

 



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