[
https://issues.apache.org/jira/browse/KAFKA-18991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937467#comment-17937467
]
José Armando García Sancio commented on KAFKA-18991:
----------------------------------------------------
Let's make sure that we cherry-pick this to all of the places where we will
cherry pick KAFKA-18723.
> 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
> Assignee: TengYao Chi
> Priority: Major
>
> 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)