ijuma commented on code in PR #15323:
URL: https://github.com/apache/kafka/pull/15323#discussion_r1489615650


##########
clients/src/main/java/org/apache/kafka/clients/Metadata.java:
##########
@@ -279,7 +286,7 @@ synchronized Optional<MetadataResponse.PartitionMetadata> 
partitionMetadataIfCur
      * @return a mapping from topic names to topic IDs for all topics with 
valid IDs in the cache
      */
     public synchronized Map<String, Uuid> topicIds() {

Review Comment:
   Why is this synchronized? We should avoid synchronized for methods that are 
simply reading a snapshot.



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