squah-confluent commented on code in PR #18777:
URL: https://github.com/apache/kafka/pull/18777#discussion_r1941385873


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMetadata.java:
##########
@@ -94,6 +95,15 @@ protected synchronized boolean retainTopic(String topic, 
boolean isInternal, lon
         if (isInternal && !includeInternalTopics)
             return false;
 
+        // Keep leader metadata for topics matching the RE2J subscription.
+        // We aim to replaced this with something more efficient in 
KAFKA-18117.

Review Comment:
   I've removed the comment. The bit I'm not so happy about is the way we scan 
over the list of assigned partitions every time `retainTopic` is called. Since 
`retainTopic` is run for every topic in the metadata, I'm concerned it could 
get expensive.



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