gaozhangmin commented on a change in pull request #12957: URL: https://github.com/apache/pulsar/pull/12957#discussion_r764512908
########## File path: pulsar-broker/src/main/java/org/apache/pulsar/common/naming/NamespaceBundleFactory.java ########## @@ -212,16 +212,18 @@ public NamespaceBundle getBundleWithHighestThroughput(NamespaceName nsName) { if (loadManager instanceof ModularLoadManagerWrapper) { NamespaceBundles bundles = getBundles(nsName); double maxMsgThroughput = -1; - NamespaceBundle bundleWithHighestThroughpit = null; + NamespaceBundle bundleWithHighestThroughput = null; for (NamespaceBundle bundle : bundles.getBundles()) { - BundleData budnleData = ((ModularLoadManagerWrapper) loadManager).getLoadManager() - .getBundleDataOrDefault(bundle.getBundleRange()); - if (budnleData.getLongTermData().totalMsgThroughput() > maxMsgThroughput) { - maxMsgThroughput = budnleData.getLongTermData().totalMsgThroughput(); - bundleWithHighestThroughpit = bundle; + BundleData bundleData = ((ModularLoadManagerWrapper) loadManager).getLoadManager() + .getBundleDataOrDefault(NamespaceBundle.getKey(bundle.getNamespaceObject(), + bundle.getKeyRange())); + if (bundleData.getTopics() > 0 Review comment: For unassigned bundle ,there is no totalMsgThroughput, using default value 50000, We cannot tell from default from real value ,if real value is also 50000. -- 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