lucliu1108 commented on code in PR #22417:
URL: https://github.com/apache/kafka/pull/22417#discussion_r3350539251
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java:
##########
@@ -429,6 +430,11 @@ private StateConsumer initialize() {
);
}
+ if (inErrorState()) {
+ closeStateConsumer(stateConsumer, false);
+ return null;
+ }
Review Comment:
The previous `try{ stateConsumer.initialize() } catch(...)` block calls
`GlobalStateUpdateTask` and will return directly if the shutdown signal is
called. In that case, `stateConsumer.initialize()` returns normally with no
exceptions thrown.
This follow-up checks the situation where shutdown is already requested, and
routes to cleanup, causes the run() loop to go to the early-exit path.
--
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]