You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/07 01:24:27 UTC

[GitHub] [pulsar] lordcheng10 commented on a diff in pull request #16401: [fix][broker] Fixed that newly added brokers cannot be assigned bundles for UniformLoadShedder

lordcheng10 commented on code in PR #16401:
URL: https://github.com/apache/pulsar/pull/16401#discussion_r915370210


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/UniformLoadShedder.java:
##########
@@ -76,7 +76,7 @@ public Multimap<String, String> findBundlesForUnloading(final LoadData loadData,
         MutableDouble minThroughputRate = new MutableDouble(Integer.MAX_VALUE);
         brokersData.forEach((broker, data) -> {
             //broker with one bundle can't be considered for bundle unloading
-            if (data.getLocalData().getBundles().size() <= 1) {
+            if (data.getLocalData().getBundles().size() == 1) {

Review Comment:
   It is not only to choose overloaded brokers to unload, but also to choose low-loaded brokers to load.
   Otherwise, a new broker cannot be assigned to the bundle



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org