CalvinConfluent commented on code in PR #17698: URL: https://github.com/apache/kafka/pull/17698#discussion_r1868276616
########## core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala: ########## @@ -564,41 +627,44 @@ class TransactionCoordinator(txnConfig: TransactionConfig, else PrepareAbort - // Maybe allocate new producer ID if we are bumping epoch and epoch is exhausted - val nextProducerIdOrErrors = - if (clientTransactionVersion.supportsEpochBump() && !txnMetadata.pendingState.contains(PrepareEpochFence) && txnMetadata.isProducerEpochExhausted) { - try { - Right(producerIdManager.generateProducerId()) - } catch { - case e: Exception => Left(Errors.forException(e)) - } + generateTxnTransitMetadataForTxnCompletion(nextState, false) + case CompleteCommit => + if (currentTxnMetadataIsAtLeastTransactionsV2) { + if (txnMarkerResult == TransactionResult.COMMIT) { + if (isRetry) Review Comment: Added comments for each case. -- 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