CalvinConfluent commented on code in PR #17698: URL: https://github.com/apache/kafka/pull/17698#discussion_r1870427097
########## core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala: ########## @@ -524,15 +757,16 @@ class TransactionCoordinator(txnConfig: TransactionConfig, producerIdCopy = txnMetadata.producerId producerEpochCopy = txnMetadata.producerEpoch // PrepareEpochFence has slightly different epoch bumping logic so don't include it here. - val currentTxnMetadataIsAtLeastTransactionsV2 = !txnMetadata.pendingState.contains(PrepareEpochFence) && txnMetadata.clientTransactionVersion.supportsEpochBump() + // Note that, it can only happen when the current state is Ongoing. + val isPrepareEpochFence = txnMetadata.pendingState.contains(PrepareEpochFence) Review Comment: Yeah, you are right, there are the same. When the pending state is PrepareEpochFence, it will only go to the `Ongoing` handling where we set the `isEpochFence` to true. -- 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