philipnee commented on code in PR #14937:
URL: https://github.com/apache/kafka/pull/14937#discussion_r1420798994


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java:
##########
@@ -273,80 +250,28 @@ private void closeInternal(final Duration timeout) {
         }
     }
 
+    private void sendUnsentRequests(final Timer timer) {
+        // Poll to ensure that request has been written to the socket. Wait 
until either the timer has expired or until
+        // all requests have received a response.
+        while (!networkClientDelegate.unsentRequests().isEmpty() && 
timer.notExpired()) {

Review Comment:
   sorry, to reiterate on your comment, perhaps your suggestion is: if time has 
run out, we do client.poll(0) to try to send and process the request one last 
time. if the time hasn't run out and there are still request to be sent, we 
continue to poll until all requests are sent and timer runs out.  Is this what 
you meant?



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