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


##########
clients/src/main/java/org/apache/kafka/clients/Metadata.java:
##########
@@ -127,6 +127,13 @@ public synchronized Cluster fetch() {
         return cache.cluster();
     }
 
+    /**
+     * Get the current metadata cache.
+     */
+    public synchronized MetadataCache fetchCache() {

Review Comment:
   It makes sense to require exclusive access when building the cache, but here 
we're just accessing the built value. So I don't think the synchronization is 
necessary. 



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