wrunderwood commented on a change in pull request #96:
URL: https://github.com/apache/solr/pull/96#discussion_r643433720



##########
File path: 
solr/core/src/java/org/apache/solr/util/circuitbreaker/CPUCircuitBreaker.java
##########
@@ -110,6 +113,27 @@ public double getCpuUsageThreshold() {
   }
 
   protected double calculateLiveCPUUsage() {
-    return operatingSystemMXBean.getSystemLoadAverage();
+    Metric metric = this.core
+        .getCoreContainer()
+        .getMetricManager()
+        .registry("solr.jvm")
+        .getMetrics()
+        .get("os.systemCpuLoad");

Review comment:
       The existing CPU CB is actually a load average CB. Load average is 
implented differently in different OSes and is not always purely CPU. Also, 
load average is no limited to 0-100 as documented.
   
   The existing CB is renamed to an accurate name with accurate documentation.
   
   A new CB is created that does what the original CB was documented to do, 
based on CPU usage instead of load average. 




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to