AndrewJSchofield commented on code in PR #19980:
URL: https://github.com/apache/kafka/pull/19980#discussion_r2318806420


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########
@@ -222,6 +222,10 @@ protected void handleFetchSuccess(final Node fetchTarget,
                 fetchBuffer.add(completedFetch);
             }
 
+            // "Wake" the fetch buffer on any response, even if it's empty, to 
allow the consumer to not block
+            // indefinitely waiting on the fetch buffer to get data.
+            fetchBuffer.wakeup();

Review Comment:
   nit: Given that `fetchBuffer.add` already wakes, it seems unnecessary to 
called `fetchBuffer.wakeup` unless nothing was added to the buffer. This is 
harmless I think, but just an observation.



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