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


##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -498,6 +498,45 @@ class TransactionCoordinator(txnConfig: TransactionConfig,
       requestLocal)
   }
 
+  /*
+    The state transition for Empty, CompleteAbort, CompleteCommit is 
complicated, so here is a table to make it clear.
+    Note:
+    PF = PRODUCER_FENCED
+    ITS = INVALID_TXN_STATE
+    NONE = No error and no epoch bump
+    EB = No error and epoch bump
+
+    Retry => producerEpoch = txnState.ProducerEpoch - 1

Review Comment:
   Hmm -- retry is a little interesting here, since the retry is only a retry 
if the state is prepare/complete abort? for the other cases, it is a fenced 
request? I think for v2 empty + "retry" should be its? Since if we just 
aborted, we can't go back to empty.



-- 
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