Setup
- Solr version: 9.4.0
- Drupal Core version: 9.5.11
- Search API version: 8.x-1.30
- Search API Solr version: 4.3.0
- Configured Solr Connector: Basic Auth
Issue
I'm seeing this warning in my Solr admin log after upgrading to Solr 9.4.0:
Solr loaded a deprecated plugin/analysis class [solr.CircuitBreakerManager]. Please consult documentation how to replace it accordingly.
CircuitBreakerManager is deprecated. Use individual Circuit Breakers instead
Looking at the Solr documentation (https://solr.apache.org/guide/solr/latest/deployment-guide/circuit-break...), we see:
The legacy configuration syntax using CircuitBreakerManager is deprecated as of Solr 9.4, but will continue to work. The "CPU" circuit breaker used by this legacy plugin when configuring a cpuThreshold is actually the LoadAverageCircuitBreaker described below. Also, the CircuitBreakerManager will return a HTTP 503 code instead of the HTTP 429 code used by the new circuit breakers.
This is what's in the solrconfig.xml file:
<circuitBreaker class="solr.CircuitBreakerManager" enabled="true">
<!-- Memory Circuit Breaker
Specific configuration for max JVM heap usage circuit breaker. This configuration defines
whether the circuit breaker is enabled and the threshold percentage of maximum heap allocated
beyond which queries will be rejected until the current JVM usage goes below the threshold.
The valid value for this range is 50-95.
Consider a scenario where the max heap allocated is 4 GB and memThreshold is defined as 75.
Threshold JVM usage will be 4 * 0.75 = 3 GB. Its generally a good idea to keep this value
between 75 - 80% of maximum heap allocated.
If, at any point, the current JVM heap usage goes above 3 GB, queries will be rejected until
the heap usage goes below 3 GB again. If you see queries getting rejected with 503 error code,
check for "Circuit Breakers tripped" in logs and the corresponding error message should tell
you what transpired (if the failure was caused by tripped circuit breakers).
-->
<!--
<str name="memEnabled">true</str>
<str name="memThreshold">75</str>
-->
<!-- CPU Circuit Breaker Configuration
Specific configuration for CPU utilization based circuit breaker. This configuration defines
whether the circuit breaker is enabled and the average load over the last minute at which the
circuit breaker should start rejecting queries.
-->
<!--
<str name="cpuEnabled">true</str>
<str name="cpuThreshold">75</str>
-->
</circuitBreaker>
This is what they should be for compatibility with Solr 9.4+
<circuitBreaker class="solr.MemoryCircuitBreaker">
<double name="threshold">75</double>
</circuitBreaker>
<circuitBreaker class="solr.CPUCircuitBreaker">
<double name="threshold">75</double>
</circuitBreaker>
or maybe "LoadAverageCircuitBreaker" instead of "CPUCircuitBreaker":
<circuitBreaker class="solr.LoadAverageCircuitBreaker">
<double name="threshold">8.0</double>
</circuitBreaker>