ahuang98 commented on code in PR #17807:
URL: https://github.com/apache/kafka/pull/17807#discussion_r1883093873


##########
raft/src/main/java/org/apache/kafka/raft/FollowerState.java:
##########
@@ -37,6 +37,10 @@ public class FollowerState implements EpochState {
     private final Set<Integer> voters;
     // Used for tracking the expiration of both the Fetch and FetchSnapshot 
requests
     private final Timer fetchTimer;
+    /* Used to track if we have fetched from the leader at least once since 
the transition to follower in this epoch.
+     * If we have not yet fetched from the leader, we may grant PreVotes.
+     */
+    private boolean hasFetchedFromLeader;

Review Comment:
   ah gotcha!



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