You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "janhoy (via GitHub)" <gi...@apache.org> on 2023/08/23 13:55:09 UTC

[GitHub] [solr] janhoy commented on a diff in pull request #1725: SOLR-15474 Make Circuit breakers pluggable (take 2)

janhoy commented on code in PR #1725:
URL: https://github.com/apache/solr/pull/1725#discussion_r1303062115


##########
solr/core/src/java/org/apache/solr/util/circuitbreaker/CPUCircuitBreaker.java:
##########
@@ -38,31 +38,24 @@ public class CPUCircuitBreaker extends CircuitBreaker {
   private static final OperatingSystemMXBean operatingSystemMXBean =
       ManagementFactory.getOperatingSystemMXBean();
 
-  private final boolean enabled;
-  private final double cpuUsageThreshold;
+  private double cpuUsageThreshold;
 
   // Assumption -- the value of these parameters will be set correctly before invoking
   // getDebugInfo()
   private static final ThreadLocal<Double> seenCPUUsage = ThreadLocal.withInitial(() -> 0.0);
 
   private static final ThreadLocal<Double> allowedCPUUsage = ThreadLocal.withInitial(() -> 0.0);
 
-  public CPUCircuitBreaker(CircuitBreakerConfig config) {
-    super(config);
+  public CPUCircuitBreaker() {
+    super();
+  }

Review Comment:
   I wonder if an explicit default constructor is necessary when you do reflection (plugin loading)...



-- 
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: issues-unsubscribe@solr.apache.org

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


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