Demogorgon314 commented on code in PR #19102:
URL: https://github.com/apache/pulsar/pull/19102#discussion_r1493927408
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:
##########
@@ -175,7 +176,14 @@ public CompletableFuture<Optional<LookupResult>>
getBrokerServiceUrlAsync(TopicN
long startTime = System.nanoTime();
CompletableFuture<Optional<LookupResult>> future =
getBundleAsync(topic)
- .thenCompose(bundle -> findBrokerServiceUrl(bundle, options));
+ .thenCompose(bundle -> {
+ if
(ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config)) {
+ return
loadManager.get().findBrokerServiceUrl(Optional.of(topic), bundle);
+ } else {
+ // TODO: Add unit tests cover it.
Review Comment:
Thanks for your advice. We should refactor the NamespaceService instead of
adding so many if else here. We can remove this to-do when we're doing
refactoring.
--
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]