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/09/13 01:05:12 UTC

[GitHub] [pulsar] merlimat commented on a diff in pull request #17598: [improve][loadbalance] added loadBalancerReportUpdateMemoryUsageChecked and loadBalancerReportUpdateMinIntervalMilliSeconds configs

merlimat commented on code in PR #17598:
URL: https://github.com/apache/pulsar/pull/17598#discussion_r969049493


##########
pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LocalBrokerData.java:
##########
@@ -235,7 +235,16 @@ private void updateBundleData(final Map<String, NamespaceBundleStats> bundleStat
     }
 
     public double getMaxResourceUsage() {
-        return max(cpu.percentUsage(), memory.percentUsage(), directMemory.percentUsage(), bandwidthIn.percentUsage(),
+        return getMaxResourceUsage(true);
+    }
+
+    public double getMaxResourceUsage(boolean checkMemoryUsage) {
+        if (checkMemoryUsage) {

Review Comment:
   I would suggest to remove this config option and instead only check the direct memory but not the heap memory usage here.



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