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

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


Reply via email to