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/11/01 21:53:34 UTC

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

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



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java
##########
@@ -423,9 +423,9 @@ synchronized int numAssignedPartitions() {
     }
 
     // Visible for testing
-    public synchronized List<TopicPartition> fetchablePartitions(Predicate<TopicPartition> isAvailable) {
+    // This method returns its results in a list provided as it is on hot path and causes considerable pressure on gc otherwise

Review comment:
       Can you add JavaDoc explaining that the result is stored in the final parameter?
   
   Also, if we are not allocating a new List here, I don't see why we should return anything from this function.




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