You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "showuon (via GitHub)" <gi...@apache.org> on 2023/10/02 13:03:50 UTC

Re: [PR] KAFKA-15489: resign leadership when no fetch from majority voters [kafka]

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


##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -965,6 +965,10 @@ private CompletableFuture<FetchResponseData> handleFetchRequest(
         }
 
         int replicaId = FetchRequest.replicaId(request);
+
+        Optional<LeaderState<T>> state = quorum.maybeLeaderState();
+        state.ifPresent(s -> s.maybeResetMajorityFollowerFetchTimeout(replicaId, currentTimeMs));

Review Comment:
   Agree! Now, we update the timer when we update the lastFetchTimestamp in replicaState.



-- 
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-unsubscribe@kafka.apache.org

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