You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/06/22 16:44:34 UTC

[GitHub] [kafka] hachikuji commented on a change in pull request #10913: KAFKA-12631; Implement `resign` API in `KafkaRaftClient`

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



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -1914,8 +1917,7 @@ private long pollLeader(long currentTimeMs) {
         LeaderState<T> state = quorum.leaderStateOrThrow();
         maybeFireLeaderChange(state);
 
-        GracefulShutdown shutdown = this.shutdown.get();
-        if (shutdown != null) {
+        if (shutdown.get() != null || resignedEpoch.get() == state.epoch()) {

Review comment:
       The main difference is the behavior of the Resigned state itself. When the client is shutting down, we will not transition out of the resigned state (or any other state) to become a candidate.




-- 
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:
users@infra.apache.org