gaoran10 commented on code in PR #20652:
URL: https://github.com/apache/pulsar/pull/20652#discussion_r1243115567
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java:
##########
@@ -717,19 +717,19 @@ public CompletableFuture<Void>
validateBundleOwnershipAsync(NamespaceBundle bund
throw new RestException(Status.PRECONDITION_FAILED,
"Failed to find ownership for ServiceUnit:" +
bundle.toString());
}
- // If the load manager is extensible load manager, we
don't need check the authoritative.
- if
(ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config())) {
- return CompletableFuture.completedFuture(null);
- }
return nsService.isServiceUnitOwnedAsync(bundle)
.thenAccept(owned -> {
if (!owned) {
boolean newAuthoritative =
this.isLeaderBroker();
// Replace the host and port of the
current request and redirect
- URI redirect =
UriBuilder.fromUri(uri.getRequestUri()).host(webUrl.get().getHost())
-
.port(webUrl.get().getPort()).replaceQueryParam("authoritative",
-
newAuthoritative).replaceQueryParam("destinationBroker",
- null).build();
+ UriBuilder uriBuilder =
UriBuilder.fromUri(uri.getRequestUri())
+ .host(webUrl.get().getHost())
+ .port(webUrl.get().getPort())
+
.replaceQueryParam("authoritative", newAuthoritative);
+ if
(!ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(config())) {
Review Comment:
Do we need to add this condition?
--
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]