ableegoldman commented on a change in pull request #8900: URL: https://github.com/apache/kafka/pull/8900#discussion_r443828344
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java ########## @@ -267,7 +283,17 @@ public void close() { private void checkForException() { if (sendException != null) { - throw sendException; + if (sendException.getCause() instanceof KafkaException + && sendException.getCause().getMessage().equals("Failing batch since transaction was aborted")) { Review comment: That sounds right, we should never see this exception outside of `closeDirty` since we should then close all tasks dirty if the transaction is aborted. But as for whether to check it in `closeDirty`, I think we would need to at the very least check it so we can reset the exception afterwards. Or do you think it's "safe" to just blindly reset the exception in the case of a dirty close, no matter what it was? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org