TaiJuWu commented on code in PR #19658: URL: https://github.com/apache/kafka/pull/19658#discussion_r2080885590
########## raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java: ########## @@ -1048,14 +1053,18 @@ private void maybeHandleElectionLoss(NomineeState state, long currentTimeMs) { } } - private int binaryExponentialElectionBackoffMs(int retries) { + // visible for testing + static int binaryExponentialElectionBackoffMs(int backoffMaxMs, int retries, Random random) { Review Comment: Could we use https://github.com/apache/kafka/blob/e1b2adea07cebaac6d1138ec18778c575aef57f4/clients/src/main/java/org/apache/kafka/common/utils/ExponentialBackoff.java#L34 in the module? -- 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