mjsax commented on a change in pull request #8856: URL: https://github.com/apache/kafka/pull/8856#discussion_r441059100
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java ########## @@ -714,13 +717,26 @@ void shutdown(final boolean clean) { } } - if (clean && !consumedOffsetsAndMetadataPerTask.isEmpty()) { - commitOffsetsOrTransaction(consumedOffsetsAndMetadataPerTask); + try { + if (clean && !consumedOffsetsAndMetadataPerTask.isEmpty()) { + commitOffsetsOrTransaction(consumedOffsetsAndMetadataPerTask); Review comment: Thinking about punctuation, should we actually call `commitOffsetsOrTransaction()` unconditionally (ie, not consider if `consumedOffsetsAndMetadataPerTask` is empty or not? We can still move the check inside `consumedOffsetsAndMetadataPerTask`, but for EOS there might pending writes from punctuation that we still need to commit? This would apply to all calls of `commitOffsetsOrTransaction` ? ---------------------------------------------------------------- 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