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

[jira] [Resolved] (KAFKA-12152) Idempotent Producer does not reset the sequence number of partitions without in-flight batches

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

David Jacot resolved KAFKA-12152.
---------------------------------
    Fix Version/s: 2.7.1
                   2.8.0
         Reviewer: Jason Gustafson
       Resolution: Fixed

> Idempotent Producer does not reset the sequence number of partitions without in-flight batches
> ----------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-12152
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12152
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 2.5.0, 2.6.0, 2.7.0
>            Reporter: David Jacot
>            Assignee: David Jacot
>            Priority: Major
>             Fix For: 2.8.0, 2.7.1
>
>
> When a `OutOfOrderSequenceException` error is received by an idempotent producer for a partition, the producer bumps its epoch, adjusts the sequence number and the epoch of the in-flight batches of the partitions affected by the `OutOfOrderSequenceException` error. This happens in `TransactionManager#bumpIdempotentProducerEpoch`.
> The remaining partitions are treated separately. When the last in-flight batch of a given partition is completed, the sequence number is reset. This happens in `TransactionManager#handleCompletedBatch`.
> However, when a given partition does not have in-flight batches when the producer epoch is bumped, its sequence number is not reset. It results in having subsequent producer request to use the new producer epoch with the old sequence number and to be rejected by the broker.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)