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



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java
##########
@@ -416,7 +428,13 @@ boolean joinGroupIfNeeded(final Timer timer) {
             }
 
             final RequestFuture<ByteBuffer> future = initiateJoinGroup();
-            client.poll(future, timer);
+
+            // if the flat is not set to true; we only try once and not block 
on the join result
+            if (waitUntilComplete)
+                client.poll(future, timer);
+            else
+                client.poll(timer);

Review comment:
       My rationale after thinking about this, is that it may be better to wait 
on at least some IOs to be done, especially if there are on-going fetch 
requests as well: we may complete writing a fetch request, or join / sync group 
request, or reading a response before returning.




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

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


Reply via email to