You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/27 07:39:33 UTC

[GitHub] [pulsar] wuzhanpeng commented on a change in pull request #10707: force to refresh partition metadata info

wuzhanpeng commented on a change in pull request #10707:
URL: https://github.com/apache/pulsar/pull/10707#discussion_r640365420



##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/BaseResources.java
##########
@@ -86,6 +86,13 @@ public BaseResources(MetadataStoreExtended store, TypeReference<T> typeRef, int
         return cache.get(path);
     }
 
+    public CompletableFuture<Optional<T>> getAsync(String path, boolean forceRefresh) {
+        if (forceRefresh) {

Review comment:
       Yes I agree. But I think in this scenario, the final state of znode depends on the execution progress of both `MetadataCacheImpl#delete` and `MetadataCacheImpl#accept`. If the execution time of `accept` is shorter than that of `delete`, then the state of znode is `Optional.empty()` instead of `invalidated`. So I wonder if it should invalidate the path at the end of the delete operation, not replace with an `Optional.empty()`.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org