heesung-sn commented on code in PR #23626:
URL: https://github.com/apache/pulsar/pull/23626#discussion_r1854261250


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/models/TopKBundles.java:
##########
@@ -72,6 +72,12 @@ public void update(Map<String, NamespaceBundleStats> 
bundleStats, int topk) {
                     
pulsar.getConfiguration().isLoadBalancerSheddingBundlesWithPoliciesEnabled();
             for (var etr : bundleStats.entrySet()) {
                 String bundle = etr.getKey();
+                var stat = etr.getValue();
+
+                // skip zero traffic bundles
+                if (stat.msgThroughputIn + stat.msgThroughputOut == 0) {

Review Comment:
   > This PR only skips zero traffic bundles.
   
   I meant "exactly" zero traffic, when both msgThroughputIn and 
stat.msgThroughputIn are "exactly" zero.



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/models/TopKBundles.java:
##########
@@ -72,6 +72,12 @@ public void update(Map<String, NamespaceBundleStats> 
bundleStats, int topk) {
                     
pulsar.getConfiguration().isLoadBalancerSheddingBundlesWithPoliciesEnabled();
             for (var etr : bundleStats.entrySet()) {
                 String bundle = etr.getKey();
+                var stat = etr.getValue();
+
+                // skip zero traffic bundles
+                if (stat.msgThroughputIn + stat.msgThroughputOut == 0) {

Review Comment:
   > This PR only skips zero traffic bundles.
   
   I meant "exactly" zero traffic, when both msgThroughputIn and 
stat.msgThroughputIn are "exactly" zero.



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