David Jacot created KAFKA-12152:
-----------------------------------
Summary: 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.7.0, 2.6.0, 2.5.0
Reporter: David Jacot
Assignee: David Jacot
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)