jolshan commented on code in PR #21735:
URL: https://github.com/apache/kafka/pull/21735#discussion_r4557959858


##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -561,7 +606,10 @@ class TransactionCoordinator(txnConfig: TransactionConfig,
           val coordinatorEpoch = epochAndTxnMetadata.coordinatorEpoch
 
           txnMetadata.inLock(() => {
-            if (txnMetadata.producerId != producerId)
+            // A transaction kept with InitProducerId(keepPreparedTxn=true) 
can only be completed with TV2.
+            if (txnMetadata.hasNextProducerEpoch)

Review Comment:
   Does this one also risk being triggered by a stale request? Maybe a bit less 
likely.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to