artemlivshits commented on code in PR #17698:
URL: https://github.com/apache/kafka/pull/17698#discussion_r1871984412
##########
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:
Ok, then why do we have this method in the first place? Let's just check
that the epoch is bumped in the callback.
--
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]