kirktrue commented on code in PR #13591: URL: https://github.com/apache/kafka/pull/13591#discussion_r1204760045
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java: ########## @@ -626,12 +704,14 @@ public synchronized void maybeTransitionToErrorState(RuntimeException exception) if (canBumpEpoch() && !isCompleting()) { epochBumpRequired = true; } - transitionToAbortableError(exception); + transitionToAbortableError(exception, invalidStateDetectionStrategy); } } - - synchronized void handleFailedBatch(ProducerBatch batch, RuntimeException exception, boolean adjustSequenceNumbers) { - maybeTransitionToErrorState(exception); + synchronized void handleFailedBatch(ProducerBatch batch, Review Comment: @urbandan There is only one place that `handleFailedBatch` is called with `FOREGROUND`: the `TransactionManagerTest.testForegroundInvalidStateTransitionIsRecoverable()` method. That unit test was calling `handleFailedBatch` as a simple way to simulate the state transition error. I updated the test using a different means. As such, I was able to remove that parameter. Thanks! -- 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