kevin-wu24 commented on PR #20859: URL: https://github.com/apache/kafka/pull/20859#issuecomment-3584110211
@showuon regarding: > This will not work because if the node lag a lot. The 1st fetch might not be able to catch up with the leader. Where in the code can this situation happen? I was under the impression that when a lagging follower node sends a fetch request to the leader, the leader does one of two things if there is no diverging log: 1. If the leader's log start offset is greater than the followers fetch offset, the leader sends a response telling the follower to fetch a snapshot. 2. Otherwise, send all the records until the end of the log in the fetch response: https://github.com/apache/kafka/blob/trunk/raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java#L1625. This means when a node receives a fetch response, they get the uncommitted state (if it exists) on the leader. Am I missing something? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
