lucliu1108 commented on code in PR #22417:
URL: https://github.com/apache/kafka/pull/22417#discussion_r3344429460


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java:
##########
@@ -299,7 +300,13 @@ public void run() {
                 if (size != -1L) {
                     cache.resize(size);
                 }
-                stateConsumer.pollAndUpdate();
+                try {
+                    stateConsumer.pollAndUpdate();
+                } catch (final WakeupException e) {
+                    if (!inErrorState()) {
+                        throw e;
+                    }
+                }

Review Comment:
   Good catch!  The steady-state catch wasn't really about bootstrap. I removed 
it, and also tightened `shutdown()` to only triggering 
`globalConsumer.wakeup()` when the thread is still in CREATED state (i.e., 
still bootstrapping). The steady-state main loop is now untouched by this PR.



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

Reply via email to