artemlivshits commented on code in PR #17402: URL: https://github.com/apache/kafka/pull/17402#discussion_r1807117576
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java: ########## @@ -762,7 +764,7 @@ synchronized void maybeResolveSequences() { // For the transactional producer, we bump the epoch if possible, otherwise we transition to a fatal error String unackedMessagesErr = "The client hasn't received acknowledgment for some previously " + "sent messages and can no longer retry them. "; - if (canBumpEpoch()) { + if (!isTransactionV2Enabled && canBumpEpoch()) { Review Comment: I cannot think of a correctness issue resulting from redundant epoch bump, but out of caution I'd suggest that we get the change in before making TV2 ready, I think it's just going to be easier to review as a separate PR (and merging this PR would also unblock the PR where we remove explicit add partitions call). So call this PR [2/3] and then have another PR [3/3] to remove manual epoch bumping logic. -- 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