BewareMyPower commented on code in PR #25518:
URL: https://github.com/apache/pulsar/pull/25518#discussion_r3078777498
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -1395,6 +1395,15 @@ public CompletableFuture<Void>
setNamespaceBundleAffinityAsync(String bundleRang
if (StringUtils.isBlank(destinationBroker)) {
return CompletableFuture.completedFuture(null);
}
+ final String bundleName;
+ try {
+ bundleName =
pulsar().getNamespaceService().getNamespaceBundleFactory()
+ .getBundle(namespaceName.toString(), bundleRange)
+ .toString();
+ } catch (RuntimeException e) {
+ return FutureUtil.failedFuture(e);
+ }
Review Comment:
No need to catch unchecked exception here.
This method is called in `thenCompose`, any uncaught exception will be
reflected in the final returned future.
--
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]