You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "José Armando García Sancio (Jira)" <ji...@apache.org> on 2023/01/12 23:11:00 UTC

[jira] [Updated] (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 ]

José Armando García Sancio updated KAFKA-14618:
-----------------------------------------------
    Description: We implemented new snapshot generation logic here: [https://github.com/apache/kafka/pull/12983|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|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.  (was: 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.)

> 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: Jason Gustafson
>            Priority: Blocker
>             Fix For: 3.4.0
>
>
> We implemented new snapshot generation logic here: [https://github.com/apache/kafka/pull/12983|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|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)