thetumbled commented on code in PR #22753: URL: https://github.com/apache/pulsar/pull/22753#discussion_r1610869813
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java: ########## @@ -1122,6 +1126,32 @@ public void writeBrokerDataOnZooKeeper(boolean force) { } } + /** + * sort bundles by load and select topK bundles for each broker. + * @return the number of bundles selected + */ + private int selectTopKBundle() { + bundleArr.clear(); + bundleArr.addAll(loadData.getBundleData().entrySet()); + + int maxNumberOfBundlesInBundleLoadReport = pulsar.getConfiguration() Review Comment: It is unworthy and weird that we introduce a new `boolean` type conf `enableBundleFilterForModularLoadManagerImpl` only for disabling this feature by default, as there are too many conf in Pulsar. And if you want to introduce a new `int` type conf `loadBalancerMaxBundleReportForModularLoadManagerImpl` to avoid reusing `loadBalancerMaxNumberOfBundlesInBundleLoadReport`, this is the original design in https://github.com/apache/pulsar/pull/20972, which has been discussed and closed. WDYT @dao-jun @lhotari @Technoboy- @codelipenghui @Demogorgon314 @heesung-sn -- 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