lifepuzzlefun commented on code in PR #21333:
URL: https://github.com/apache/pulsar/pull/21333#discussion_r1352256665


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -2136,13 +2136,16 @@ public void monitorBacklogQuota() {
         });
     }
 
-    public boolean isTopicNsOwnedByBroker(TopicName topicName) {
-        try {
-            return pulsar.getNamespaceService().isServiceUnitOwned(topicName);
-        } catch (Exception e) {
-            log.warn("Failed to check the ownership of the topic: {}, {}", 
topicName, e.getMessage());
-        }
-        return false;
+    public CompletableFuture<Boolean> isTopicNsOwnedByBrokerAsync(TopicName 
topicName) {
+        return pulsar.getNamespaceService().isServiceUnitOwnedAsync(topicName)

Review Comment:
   i notice that the sync version will at least with a timeout of 
`getMetadataStoreOperationTimeoutSeconds`. Maybe we need a timeout here.



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