divijvaidya commented on code in PR #12465: URL: https://github.com/apache/kafka/pull/12465#discussion_r1000520162
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java: ########## @@ -1146,6 +1146,10 @@ private long advanceNowAndComputeLatency() { public void shutdown() { log.info("Informed to shut down"); final State oldState = setState(State.PENDING_SHUTDOWN); + + // If the thread is already shutting down, this is a No-op. + if (oldState == State.PENDING_SHUTDOWN || oldState == State.DEAD) return; Review Comment: Thanks for pointing this out. I missed reading the setState code. I have reverted this change. -- 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