thetumbled commented on code in PR #21085:
URL: https://github.com/apache/pulsar/pull/21085#discussion_r1506916208


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java:
##########
@@ -1139,6 +1143,29 @@ public void writeBrokerDataOnZooKeeper(boolean force) {
         }
     }
 
+    /**
+     * sort bundles by load and select topK bundles for each broker.
+     * @return the number of bundles selected
+     */
+    private CompletableFuture<Integer> selectTopKBundle() {

Review Comment:
   I still support that it is leader's responsibility to filter topK, bacause 
the main pressure is caused by large number of znodes corresponding to large 
number of bundles stats **uploaded by leader**. 
   Filtering bundles in follower only minimize the size of single znode, which 
do not reduce too much pressure on zk. If neccessary, we can raise another pr 
to implement it.



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to