lianetm commented on code in PR #23124:
URL: https://github.com/apache/kafka/pull/23124#discussion_r3754612044


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractFetch.java:
##########
@@ -224,15 +222,10 @@ protected void handleFetchSuccess(final Node fetchTarget,
                         partitionData,
                         metricAggregator,
                         fetchOffset);
+                // Add data to the buffer, which wakes it so the application 
thread collects the data.
                 fetchBuffer.add(completedFetch);
-                needsWakeup = false;
             }
 
-            // "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.
-            if (needsWakeup)
-                fetchBuffer.wakeup();

Review Comment:
   this wake up moves to the `removePendingFetchRequest` to ensure it's 
triggered from the failed fetch path too



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to