gaoran10 commented on code in PR #20652:
URL: https://github.com/apache/pulsar/pull/20652#discussion_r1244582808


##########
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:
   Got it, thanks. Before, the param `destinationBroker` was only used by the 
bundle unload command, so it's a little confusing.
   
   The bundle unload command with param `destinationBroker` can't work with the 
extensible load manager, right?



##########
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:
   Got it, thanks. Before, the param `destinationBroker` was only used by the 
bundle unload command, so it's a little confusing.
   
   The bundle unload command with the param `destinationBroker` can't work with 
the extensible load manager, right?



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