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


##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -819,11 +819,14 @@ class TransactionCoordinator(txnConfig: TransactionConfig,
                 }
 
               if (nextState == TransactionState.PREPARE_ABORT && isEpochFence) 
{
-                // We should clear the pending state to make way for the 
transition to PrepareAbort and also bump
-                // the epoch in the transaction metadata we are about to 
append.
+                // We should clear the pending state to make way for the 
transition to PrepareAbort

Review Comment:
   Should this comment be changed back to reflect TV1 vs TV2?



##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -819,11 +819,14 @@ class TransactionCoordinator(txnConfig: TransactionConfig,
                 }
 
               if (nextState == TransactionState.PREPARE_ABORT && isEpochFence) 
{
-                // We should clear the pending state to make way for the 
transition to PrepareAbort and also bump
-                // the epoch in the transaction metadata we are about to 
append.
+                // We should clear the pending state to make way for the 
transition to PrepareAbort
                 txnMetadata.pendingState = None
-                txnMetadata.producerEpoch = producerEpoch
-                txnMetadata.lastProducerEpoch = RecordBatch.NO_PRODUCER_EPOCH
+                if (!clientTransactionVersion.supportsEpochBump()) {

Review Comment:
   So we can just remove this code?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to