ableegoldman commented on a change in pull request #8776: URL: https://github.com/apache/kafka/pull/8776#discussion_r434118800
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StandbyTask.java ########## @@ -247,6 +247,9 @@ private void close(final boolean clean) { "state manager close", log ); + } else if (state() == State.CLOSED) { + log.trace("Skip closing since state is {}", state()); + return; } else { throw new IllegalStateException("Illegal state " + state() + " while closing standby task " + id); Review comment: I see. I guess personally I'd prefer to use a `switch` and just case all states explicitly, to make it clear when an action is a no-op for a certain state ---------------------------------------------------------------- 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