heesung-sn commented on code in PR #21894:
URL: https://github.com/apache/pulsar/pull/21894#discussion_r1454021090


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/SimpleLoadManagerImpl.java:
##########
@@ -702,7 +702,7 @@ private synchronized void doLoadRanking() {
                 }
 
                 // update metrics
-                if (resourceUnit.getResourceId().contains(hostname)) {
+                if (resourceUnit.getResourceId().startsWith(hostname + ":")) {

Review Comment:
   nit: is ":" required?



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerWrapper.java:
##########
@@ -149,10 +133,7 @@ public CompletableFuture<Set<String>> 
getAvailableBrokersAsync() {
     }
 
     private SimpleResourceUnit buildBrokerResourceUnit (String broker) {
-        String webServiceUrl = getBrokerWebServiceUrl(broker);
-        String brokerZnodeName = getBrokerZnodeName(broker, webServiceUrl);
-        return new SimpleResourceUnit(webServiceUrl,
-                new PulsarResourceDescription(), 
Map.of(ResourceUnit.PROPERTY_KEY_BROKER_ZNODE_NAME, brokerZnodeName));
+        return new SimpleResourceUnit(broker, new PulsarResourceDescription());

Review Comment:
   is this backward-compatible? Will this update cause any lingering broker 
znodes?



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