BewareMyPower commented on code in PR #24658: URL: https://github.com/apache/pulsar/pull/24658#discussion_r2297119840
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java: ########## @@ -419,6 +418,22 @@ public void addOwnedNamespaceBundleAsync(NamespaceBundle namespaceBundle) { }); } + private CompletableFuture<SystemTopicClient.Reader<PulsarEvent>> newReader(NamespaceName ns) { + return readerCaches.compute(ns, (__, existingFuture) -> { + if (existingFuture == null) { + return createSystemTopicClient(ns); + } + + if (existingFuture.isCompletedExceptionally()) { + if (isAlreadyClosedException(existingFuture)) { Review Comment: This should be applied to line 406 as well ``` cleanCache(namespace, false, readerCompletableFuture.isCompletedExceptionally()); ``` Let me submit a patch directly -- 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