You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/09/24 12:53:50 UTC

[GitHub] [kafka] mprusakov commented on a change in pull request #11353: KAFKA-13322: Reducing amount of garbage that gets generated during a poll operation

mprusakov commented on a change in pull request #11353:
URL: https://github.com/apache/kafka/pull/11353#discussion_r715587090



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -1153,7 +1155,9 @@ private void handleListOffsetResponse(ListOffsetsResponse listOffsetsResponse,
         for (CompletedFetch completedFetch : completedFetches) {
             exclude.add(completedFetch.partition);
         }
-        return subscriptions.fetchablePartitions(tp -> !exclude.contains(tp));
+        // Need to clear the buffer first otherwise it will contain results from the previous fetch
+        fetchablePartitionsResultBuffer.clear();

Review comment:
       Added the comment requested. Please let me know if further changes are required.




-- 
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-unsubscribe@kafka.apache.org

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