Jun Rao created KAFKA-18991:
-------------------------------

             Summary: AbstractFetcherThread should verify the current leader 
epoch in the fetch request matches the leader epoch in the fetch state
                 Key: KAFKA-18991
                 URL: https://issues.apache.org/jira/browse/KAFKA-18991
             Project: Kafka
          Issue Type: Bug
          Components: core
            Reporter: Jun Rao


This is to follow up on 
[https://github.com/apache/kafka/pull/18852#discussion_r1987826859.]

It's possible that a fetch response (for an old leader epoch) returns 
divergingEndOffsets. In this case, we will take the divergingEndOffsets in the 
fetch response and truncates the local log based on that. This could cause a 
committed record to be removed from the follow's log, potentially leading to 
data loss.

We can fix this issue by ignoring the fetch response if the leader epoch in the 
fetch request doesn't match the leader epoch in the current fetch state.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to