lhotari commented on code in PR #21894:
URL: https://github.com/apache/pulsar/pull/21894#discussion_r1455523803


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java:
##########
@@ -141,7 +141,9 @@ public void getLeaderBroker(@Suspended final AsyncResponse 
asyncResponse) {
         validateSuperUserAccessAsync().thenAccept(__ -> {
                     LeaderBroker leaderBroker = 
pulsar().getLeaderElectionService().getCurrentLeader()
                             .orElseThrow(() -> new 
RestException(Status.NOT_FOUND, "Couldn't find leader broker"));
-                    BrokerInfo brokerInfo = 
BrokerInfo.builder().serviceUrl(leaderBroker.getServiceUrl()).build();
+                    BrokerInfo brokerInfo = BrokerInfo.builder()
+                            .serviceUrl(leaderBroker.getServiceUrl())
+                            
.lookupServiceAddress(leaderBroker.getLookupServiceAddress()).build();

Review Comment:
   > Can we avoid this change to the public API? The newly added field 
lookupServiceAddress might confuse users. Users don't know the value 
localhost:8080 is HTTP lookup service or Binary lookup service.\n\nBTW, the 
serviceUrl is also not a good name. I think it should be webServiceUrl
   
   @codelipenghui It is necessary to add a field here and leave the serviceUrl 
alone, since changing that would break backwards compatibility or mixed runtime 
version compatibility.
   
   I'll rename "brokerLookupAddress" to "brokerId" everywhere in the code base 
as suggested by @Demogorgon314  so that we reduce confusion.



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