cpoerschke commented on pull request #96: URL: https://github.com/apache/solr/pull/96#issuecomment-853328967
So one possibility is to change the implementation of the existing `CPUCircuitBreaker` class and to add a new `LoadAverageCircuitBreaker` class which has the same behaviour as the existing `CPUCircuitBreaker` class. Changing an existing class's behaviour may bring backwards compatibility concerns and there being two related circuit breaker classes may raise questions of code duplication and whether or not to factor out a common base class. I wonder if another possibility could be to have a single `CPUCircuitBreaker` class and for a configurable attribute to determine the implementation's behaviour: Existing users with a configuration like this ``` <circuitBreaker class="solr.CircuitBreakerManager" enabled="true"> <str name="cpuEnabled">true</str> <str name="cpuThreshold">42</str> </circuitBreaker> ``` would continue to get their existing behaviour, equivalent to ``` <circuitBreaker class="solr.CircuitBreakerManager" enabled="true"> <str name="cpuEnabled">true</str> <str name="cpuThreshold">42</str> <str name="cpuMethod">OperatingSystemMXBean</str> </circuitBreaker> ``` configuration and users wishing to use the new alternative implementation can do so via ``` <circuitBreaker class="solr.CircuitBreakerManager" enabled="true"> <str name="cpuEnabled">true</str> <str name="cpuThreshold">7</str> <str name="cpuMethod">SolrMetricManager</str> </circuitBreaker> ``` configuration. -- 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