mjsax commented on a change in pull request #8776:
URL: https://github.com/apache/kafka/pull/8776#discussion_r434111426



##########
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:
       The state could be `RESTORING` what is _illegal_ but not _unknown_ -- We 
would need more conditions to distinguish both cases (introducing `switch()` 
would be helpful for this case). Thoughts?




----------------------------------------------------------------
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


Reply via email to