jolshan commented on code in PR #13787: URL: https://github.com/apache/kafka/pull/13787#discussion_r1256140857
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java: ########## @@ -793,19 +793,18 @@ private void failBatch( Function<Integer, RuntimeException> recordExceptions, boolean adjustSequenceNumbers ) { - if (transactionManager != null) { - try { - // This call can throw an exception in the rare case that there's an invalid state transition - // attempted. Catch these so as not to interfere with the rest of the logic. - transactionManager.handleFailedBatch(batch, topLevelException, adjustSequenceNumbers); - } catch (Exception e) { - log.debug("Encountered error when handling a failed batch", e); - } - } - this.sensors.recordErrors(batch.topicPartition.topic(), batch.recordCount); if (batch.completeExceptionally(topLevelException, recordExceptions)) { + if (transactionManager != null) { Review Comment: Hmmm -- I can probably come up with something... -- 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