hachikuji commented on a change in pull request #9531:
URL: https://github.com/apache/kafka/pull/9531#discussion_r519969208



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -1601,7 +1618,12 @@ private long pollFollower(long currentTimeMs) throws 
IOException {
     }
 
     private long pollFollowerAsVoter(FollowerState state, long currentTimeMs) 
throws IOException {
-        if (state.hasFetchTimeoutExpired(currentTimeMs)) {
+        GracefulShutdown shutdown = this.shutdown.get();
+        if (shutdown != null) {
+            // If we are a follower, then we can shutdown immediately. We want 
to
+            // skip the transition to candidate in any case.
+            return 0;

Review comment:
       If we are a follower, then there is no election in progress to help 
with. 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to