artemlivshits commented on code in PR #17698: URL: https://github.com/apache/kafka/pull/17698#discussion_r1871905289
########## core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala: ########## @@ -724,8 +977,7 @@ class TransactionCoordinator(txnConfig: TransactionConfig, // check epoch + 1. Epoch bumps from PrepareEpochFence state are handled separately, so this method should not be used to check that case. // Returns true if the transaction state epoch is the specified producer epoch + 1 and epoch bump on every transaction is expected. private def endTxnEpochBumped(txnMetadata: TransactionMetadata, producerEpoch: Short): Boolean = { - !txnMetadata.pendingState.contains(PrepareEpochFence) && txnMetadata.clientTransactionVersion.supportsEpochBump() && - txnMetadata.producerEpoch == producerEpoch + 1 + !txnMetadata.pendingState.contains(PrepareEpochFence) && txnMetadata.producerEpoch == producerEpoch + 1 Review Comment: I'm not sure we can check `txnMetadata.pendingState.contains(PrepareEpochFence)` -- when we call this function from the `sendTxnMarkersCallback` the pendingState is already something else. We need to pass the `isEpochFence` as an argument. -- 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