Open 0xDTE opened 11 months ago
torvalds.dev is analyzing the ticket
The issue you're dealing with is related to the configuration of Circuit Breakers in Solr. Currently, Circuit Breakers are configured per core in solrconfig.xml. However, cores/collections do not live in isolation, and a cluster administrator might want to enforce circuit breakers for the entire cluster.
The question raised is whether both cluster level and a core level pluggability are needed. And if core-level breakers would add to any cluster-level ones or override them for that core.
A potential design is to add this as a new plugin in solr.xml, and have them added in a new static context of CircuitBreakerRegistry. Then the isTripped logic would consult both the per-core list and the static/global list of breakers.
The files relevant to this issue are:
TestGlobalCircuitBreaker.java
: This file contains tests for the pluggable circuit breaker implementation. It tests if the global circuit breaker is registered and if indexing trips the load average circuit breaker.
CircuitBreakerRegistry.java
: This file contains the implementation of the CircuitBreakerRegistry. It keeps track of all registered circuit breaker instances for various request types. It is responsible for a holistic view of whether a circuit breaker has tripped or not. Circuit breakers may be registered globally and/or per-core.
Based on the information provided, here are some potential actions:
Review the current implementation of Circuit Breakers in Solr, specifically how they are configured per core and how they function.
Investigate the possibility of implementing cluster-level Circuit Breakers. This would involve understanding the implications of having both core-level and cluster-level Circuit Breakers.
Consider the design suggestion of adding a new plugin in solr.xml for Circuit Breakers and adding them to a new static context of CircuitBreakerRegistry.
Review the code in TestGlobalCircuitBreaker.java
and CircuitBreakerRegistry.java
to understand the current implementation and tests for Circuit Breakers.
If the design suggestion seems viable, plan out the steps for implementation and testing.
Remember to consider the potential impact on existing functionality and ensure that any changes are thoroughly tested.
nice. matches actual commits in the pull request: https://github.com/apache/solr/pull/1919/files
Currently Circuit Breakers are configured per core in solrconfig.xml. However, cores/collections do not live in isolation, and it could be that a cluster administrator would like to enforce circuit breakers for the entire cluster.
I'm not clear as to whether we need both cluster level and a core level pluggability. And would core-level breakers add to any cluster-level ones or override them for that core?
A potential design is to add this as a new plugin in solr.xml, and have them added in a new static context of CircuitBreakerRegistry. Then the isTripped logic would consult both the per-core list and the static/global list of breakers.