mjsax commented on code in PR #17185: URL: https://github.com/apache/kafka/pull/17185#discussion_r1757741092
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java: ########## @@ -529,7 +528,7 @@ private void checkForException() { final KafkaException exception = sendException.get(); if (exception != null) { - sendException.set(null); + sendException.compareAndSet(exception, null); Review Comment: I believe this is actually fixing a race condition... with `set()` we might overwrite (and thus drop) and exception which is set after we called `get()` (even if I am not 100% sure how bad it is if we drop it, give that we `throw exception;` below anyway...? -- 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