ableegoldman commented on a change in pull request #11085:
URL: https://github.com/apache/kafka/pull/11085#discussion_r672761316



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -885,8 +885,8 @@ private long pollPhase() {
             records = pollRequests(pollTime);
         } else if (state == State.PENDING_SHUTDOWN) {
             // we are only here because there's rebalance in progress,
-            // just poll with zero to complete it
-            records = pollRequests(Duration.ZERO);
+            // just long poll to give it enough time to complete it
+            records = pollRequests(pollTime);

Review comment:
       This is the main fix, see the PR description for full context. I was 
actually wondering if we shouldn't go even further and call `poll(MAX_VALUE)` 
instead, since there's really no reason to return from poll when the thread is 
shutting down but a rebalance is still in progress. 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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to