You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jun Rao (Jira)" <ji...@apache.org> on 2025/04/08 22:57:00 UTC

[jira] [Resolved] (KAFKA-18991) AbstractFetcherThread should verify the current leader epoch in the fetch request matches the leader epoch in the fetch state

     [ https://issues.apache.org/jira/browse/KAFKA-18991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao resolved KAFKA-18991.
-----------------------------
    Resolution: Fixed

> 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
>             Fix For: 4.1.0
>
>
> 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)