315157973 commented on a change in pull request #11597:
URL: https://github.com/apache/pulsar/pull/11597#discussion_r684788645



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/OwnershipCache.java
##########
@@ -258,7 +261,12 @@ public OwnedBundle getOwnedBundle(NamespaceBundle bundle) {
         CompletableFuture<OwnedBundle> future = 
ownedBundlesCache.getIfPresent(bundle);
 
         if (future != null && future.isDone() && 
!future.isCompletedExceptionally()) {
-            return future.join();
+            try {
+                return 
future.get(pulsar.getConfiguration().getZooKeeperOperationTimeoutSeconds(), 
TimeUnit.SECONDS);
+            } catch (Exception e) {
+                log.error("Get owned bundle failed ", e);
+                return null;

Review comment:
       Nice review, done




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