rreddy-22 commented on code in PR #17849: URL: https://github.com/apache/kafka/pull/17849#discussion_r1848887078
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java: ########## @@ -1209,9 +1228,31 @@ void abortableError(RuntimeException e) { transitionToAbortableError(e); } + /** + * Determines if an error should be treated as abortable or fatal, based on transaction state and configuration. + * + * - **Transactional with Epoch Bumping Available**: + * If the producer can trigger an epoch bump, the error is treated as abortable, + * allowing recovery by restarting the transaction with a new epoch. + * + * - **TransactionV2 Enabled**: + * When TransactionV2 is enabled, the producer automatically bumps the epoch on each transaction commit or abort, + * making errors abortable without manual intervention. + * + * - **Non-Transactional Producers**: + * For non-transactional producers, errors are considered abortable since no transaction rollback is necessary. Review Comment: Oya that's an oversight on my part, since I added the condition !isTransactional and in these cases we set epochBumpRequired true and treat it as an abortable error I got confused -- 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