Jason918 commented on a change in pull request #14411:
URL: https://github.com/apache/pulsar/pull/14411#discussion_r821510741



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java
##########
@@ -482,6 +485,15 @@ public void updateAll() {
     // there by each broker via updateLocalBrokerData.
     private void updateAllBrokerData() {
         final Set<String> activeBrokers = getAvailableBrokers();
+        Collection<String> newBrokers = 
CollectionUtils.subtract(activeBrokers, knownBrokers);

Review comment:
       I think it's a little weird to put a cleanup in `updateAllBrokerData`. I 
suggest we could put these logic in a new method like `cleanup()`, and call the 
method from `updateAll`.




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