rreddy-22 commented on code in PR #19910:
URL: https://github.com/apache/kafka/pull/19910#discussion_r2132508413
##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -828,7 +828,16 @@ class TransactionCoordinator(txnConfig: TransactionConfig,
nextProducerIdOrErrors.flatMap {
nextProducerId =>
- Right(coordinatorEpoch,
txnMetadata.prepareAbortOrCommit(nextState, clientTransactionVersion,
nextProducerId.asInstanceOf[Long], time.milliseconds(), noPartitionAdded))
+ // For epoch fence case, we don't want to bump the epoch
again in prepareAbortOrCommit
+ // since it was already bumped during the fencing phase to
avoid double increment
+ val transactionVersionForCall = if (isEpochFence) {
+ // Use TV_0 to prevent epoch bump since it was already
bumped during fencing
+ TransactionVersion.TV_0
Review Comment:
yess I was also concerned this was a little hacky solution that might cause
side effects, let me find another way
--
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]