You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Colin McCabe (Jira)" <ji...@apache.org> on 2023/01/13 21:26:00 UTC

[jira] [Resolved] (KAFKA-14618) Off by one error in generated snapshot IDs causes misaligned fetching

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

Colin McCabe resolved KAFKA-14618.
----------------------------------
    Resolution: Fixed

> Off by one error in generated snapshot IDs causes misaligned fetching
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-14618
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14618
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>            Assignee: José Armando García Sancio
>            Priority: Blocker
>             Fix For: 3.4.0
>
>
> We implemented new snapshot generation logic here: [https://github.com/apache/kafka/pull/12983]. A few days prior to this patch getting merged, we had changed the `RaftClient` API to pass the _exclusive_ offset when generating snapshots instead of the inclusive offset: [https://github.com/apache/kafka/pull/12981]. Unfortunately, the new snapshot generation logic was not updated accordingly. The consequence of this is that the state on replicas can get out of sync. In the best case, the followers fail replication because the offset after loading a snapshot is no longer aligned on a batch boundary.



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