lucasbru commented on code in PR #18765: URL: https://github.com/apache/kafka/pull/18765#discussion_r1939269893
########## streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java: ########## @@ -347,8 +347,9 @@ private boolean setState(final State newState) { } else if (state == State.REBALANCING && newState == State.REBALANCING) { // when the state is already in REBALANCING, it should not transit to REBALANCING again return false; - } else if (state == State.ERROR && (newState == State.PENDING_ERROR || newState == State.ERROR)) { - // when the state is already in ERROR, its transition to PENDING_ERROR or ERROR (due to consecutive close calls) + } else if (state == State.ERROR && (newState == State.PENDING_ERROR || newState == State.ERROR || newState == State.PENDING_SHUTDOWN)) { Review Comment: > We would still miss PENDING_ERROR -> PENDING_SHUTDOWN below This is covered by `} else if (state == State.PENDING_ERROR && newState != State.ERROR) {` > as well as NOT_RUNNING -> PENDING_SHUTDOWN` above? This is covered by `} else if (state == State.NOT_RUNNING && (newState == State.PENDING_SHUTDOWN || newState == State.NOT_RUNNING)) {` -- 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