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



##########
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:
       LGTM. I think it was never correct to poll with zero in those cases, and 
just long polling even with MAX_VALUE is better.




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