Open torvalds-dev opened 12 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 it could be that a cluster administrator would like to enforce circuit breakers for the entire cluster.
You're unsure whether both cluster level and a core level pluggability are needed. You're also wondering if core-level breakers would add to any cluster-level ones or override them for that core.
A potential design you're considering 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 the registration of a global circuit breaker and its tripping during indexing.
CircuitBreakerRegistry.java: This file contains the implementation of the CircuitBreakerRegistry, which 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 the actions you should consider:
Understand the current implementation of Circuit Breakers in Solr by reviewing the relevant files (TestGlobalCircuitBreaker.java and CircuitBreakerRegistry.java).
Analyze the potential design you're considering. Understand how adding a new plugin in solr.xml and having them added in a new static context of CircuitBreakerRegistry would work. Consider how the isTripped logic would consult both the per-core list and the static/global list of breakers.
Consider the implications of having both cluster level and core level pluggability. Would this add complexity to the system? Would it provide the flexibility you need?
Consider how core-level breakers would interact with cluster-level ones. Would they add to the cluster-level ones or override them for that core? What would be the implications of each approach?
Based on your analysis, make a decision on the design and implementation. You may need to modify the existing code or add new code to implement the changes.
Test your changes thoroughly to ensure they work as expected and do not introduce new issues.
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.