Jason918 commented on a change in pull request #13850: URL: https://github.com/apache/pulsar/pull/13850#discussion_r790262536
########## File path: pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/LocalMemoryMetadataStore.java ########## @@ -84,6 +88,14 @@ public LocalMemoryMetadataStore(String metadataURL, MetadataStoreConfig metadata // Use a reference from a shared data set String name = uri.getHost(); map = STATIC_MAPS.computeIfAbsent(name, __ -> new TreeMap<>()); + STATIC_INSTANCE.compute(name, (key, value) -> { Review comment: > The main repair here is that the following unit tests will fail. Is this in the scope of this PR? If not, it's better to open anther PR. ########## File path: pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java ########## @@ -227,15 +227,15 @@ public void accept(Notification n) { } // Ensure caches are invalidated before the operation is confirmed return storeDelete(path, expectedVersion) - .thenRun(() -> { + .thenRunAsync(() -> { Review comment: > In this way, the cache can be prevented from being executed concurrently I think it's better to ensure that in `storeDelete`, to reduce this extra context switch. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org