showuon commented on code in PR #15235:
URL: https://github.com/apache/kafka/pull/15235#discussion_r1458256739


##########
raft/src/main/java/org/apache/kafka/raft/LeaderState.java:
##########
@@ -101,6 +101,10 @@ protected LeaderState(
      * @return the remainingMs before the checkQuorumTimer expired
      */
     public long timeUntilCheckQuorumExpires(long currentTimeMs) {
+        // if there's only 1 voter, it should never get expired.
+        if (voterStates.size() == 1) {
+            return Long.MAX_VALUE;
+        }
         checkQuorumTimer.update(currentTimeMs);

Review Comment:
   I was thinking we don't need `checkQuorumTimer` for 1 voter's case, but 
since in next release, we're going to allow dynamically scaling up/down voters, 
we should keep the flexibility here.



-- 
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

Reply via email to