merlimat commented on a change in pull request #10391:
URL: https://github.com/apache/pulsar/pull/10391#discussion_r623333781



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java
##########
@@ -363,24 +343,27 @@ private void reapDeadBrokerPreallocations(Set<String> 
aliveBrokers) {
     @Override
     public Set<String> getAvailableBrokers() {
         try {
-            return availableActiveBrokers.get();
+            return new 
TreeSet<>(brokersData.listLocks(LoadManager.LOADBALANCE_BROKERS_ROOT).get());

Review comment:
       It was mostly that we used a `TreeSet` before for all the ZK returned 
children. In this case, we don't really care. I'll change it to HashSet




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to