ahuang98 commented on code in PR #19747: URL: https://github.com/apache/kafka/pull/19747#discussion_r2098754577
########## raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java: ########## @@ -3149,17 +3139,12 @@ private long pollCandidate(long currentTimeMs) { // 3) the shutdown timer expires long minRequestBackoffMs = maybeSendVoteRequests(state, currentTimeMs); return Math.min(shutdown.remainingTimeMs(), minRequestBackoffMs); - } else if (state.isBackingOff()) { - if (state.isBackoffComplete(currentTimeMs)) { - logger.info("Transition to prospective after election backoff has completed"); - transitionToProspective(currentTimeMs); - return 0L; - } - return state.remainingBackoffMs(currentTimeMs); } else if (state.hasElectionTimeoutExpired(currentTimeMs)) { logger.info("Election was not granted, transitioning to prospective"); transitionToProspective(currentTimeMs); return 0L; + } else if (state.isBackingOff()) { + return state.remainingElectionTimeMs(currentTimeMs); Review Comment: but it also sends another vote request - which we don't need to do if the vote is already lost -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org