[ https://issues.apache.org/jira/browse/KAFKA-18464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justine Olshan updated KAFKA-18464: ----------------------------------- Fix Version/s: 4.0.0 > Empty Abort Transaction can fence producer incorrectly with Transactions V2 > --------------------------------------------------------------------------- > > Key: KAFKA-18464 > URL: https://issues.apache.org/jira/browse/KAFKA-18464 > Project: Kafka > Issue Type: Bug > Affects Versions: 4.0.0 > Reporter: Justine Olshan > Assignee: Justine Olshan > Priority: Blocker > Fix For: 4.0.0 > > > Consider the following scenario using transactions V2. > Producer writes a transaction and commits. > Producer starts the next transaction and tries to add a partition but gets an > non-retriable error. Because the application doesn't know whether the > partition was added/records written the producer aborts. In the case where > the partition was not added, and the previous transaction was still in > PrepareCommit state, we self-fence. > This is because the epoch of the current state == incoming request epoch and > the PrepareCommit state currently only allows for retries where the request > epoch is -1 the current epoch. > Instead of hitting this, we should just return the concurrent transactions > error when we have pending state and do the epoch check second. In this > scenario, we will complete commit before proceeding to the empty abort. -- This message was sent by Atlassian Jira (v8.20.10#820010)