cadonna commented on code in PR #12465:
URL: https://github.com/apache/kafka/pull/12465#discussion_r984448633
##########
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:
Even if you check for `null`, `shutdown()` is also without that check a
no-op when the thread is already shutting down.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]