cpoerschke commented on a change in pull request #193: URL: https://github.com/apache/solr/pull/193#discussion_r665691418
########## File path: solr/core/src/java/org/apache/solr/util/circuitbreaker/CircuitBreakerManager.java ########## @@ -135,15 +125,61 @@ public static String toErrorMessage(List<CircuitBreaker> circuitBreakerList) { * * Any default circuit breakers should be registered here. */ + @Deprecated public static CircuitBreakerManager build(PluginInfo pluginInfo) { + return build(pluginInfo, null); + } + + /** + * TODO + */ + public static CircuitBreakerManager build(PluginInfo pluginInfo, SolrResourceLoader solrResourceLoader) { boolean enabled = pluginInfo == null ? false : Boolean.parseBoolean(pluginInfo.attributes.getOrDefault("enabled", "false")); CircuitBreakerManager circuitBreakerManager = new CircuitBreakerManager(enabled); - circuitBreakerManager.init(pluginInfo); + circuitBreakerManager.init(pluginInfo, solrResourceLoader); return circuitBreakerManager; } + /** + * Initialize with circuit breakers defined in the configuration + */ + public void init(PluginInfo pluginInfo, SolrResourceLoader solrResourceLoader) { Review comment: I have also given `ResourceLoaderAware` use a try but couldn't quite figure out how to make it work and if it's actually needed in this scenario? The https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.9.0/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java#L823-L849 caused asserts to trigger if `SolrCoreAware` or `ResourceLoaderAware` is used and the comments guide against additions to the list (though admittedly I haven't yet looked at the SOLR-8311 referenced there). `PluginInfoInitialized` use alone seems to be sufficient if we're happy to have the circuit breakers register with the circuit breaker manager similar to how the metric producers register with the metric manager? -- 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-unsubscr...@solr.apache.org 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