lhotari commented on a change in pull request #12896:
URL: https://github.com/apache/pulsar/pull/12896#discussion_r755791588



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/cache/impl/MetadataCacheImpl.java
##########
@@ -261,8 +261,11 @@ public void invalidate(String path) {
 
     @Override
     public void refresh(String path) {
-        objCache.synchronous().invalidate(path);
-        objCache.synchronous().refresh(path);
+        // Refresh object of path if only it is cached before.
+        if (objCache.getIfPresent(path) != null) {

Review comment:
       I'm just wondering if there's a possibility for races. 




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