codelipenghui commented on a change in pull request #14283:
URL: https://github.com/apache/pulsar/pull/14283#discussion_r806523879



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/cache/impl/MetadataCacheImpl.java
##########
@@ -261,12 +268,17 @@ public void invalidate(String path) {
     }
 
     @Override
-    public void refresh(String path) {
+    public CompletableFuture<Void> refresh(String path) {
         // Refresh object of path if only it is cached before.
-        if (objCache.getIfPresent(path) != null) {
-            objCache.synchronous().invalidate(path);
-            objCache.synchronous().refresh(path);
-        }
+        CompletableFuture<Void> promise = new CompletableFuture<>();
+        scheduler.executeOrdered(path, () -> {

Review comment:
       Oh, my mistake. It does not blocked at the refresh() method, because the 
test uses `.join()` while calling `readModifyUpdate`




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