vvcephei commented on a change in pull request #8776: URL: https://github.com/apache/kafka/pull/8776#discussion_r434121892
########## 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'd be in favor... I can see how the choice can go both ways on if/else vs. switch, but at the end of the day, it's nice just to do the same thing everywhere. I think switch tends to be nicer when you need to enumerate most/all of the cases, which seems to be the direction we're heading here. ---------------------------------------------------------------- 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