atris commented on a change in pull request #193: URL: https://github.com/apache/solr/pull/193#discussion_r664273166
########## File path: solr/core/src/java/org/apache/solr/util/circuitbreaker/CircuitBreakerManager.java ########## @@ -49,18 +51,6 @@ public CircuitBreakerManager(final boolean enableCircuitBreakerManager) { this.enableCircuitBreakerManager = enableCircuitBreakerManager; } - @Override Review comment: Yes, I will raise a separate PR for marking deprecation. ########## 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: @janhoy I am not sure if I understand the nuances of ResourceLoaderAware correctly, but have pushed an iteration. Please see and let me know if that is what you meant. ########## File path: solr/core/src/java/org/apache/solr/core/SolrConfig.java ########## @@ -357,7 +357,7 @@ public static final Version parseLuceneVersionString(final String matchVersion) .add(new SolrPluginInfo(IndexSchemaFactory.class, "schemaFactory", REQUIRE_CLASS)) .add(new SolrPluginInfo(RestManager.class, "restManager")) .add(new SolrPluginInfo(StatsCache.class, "statsCache", REQUIRE_CLASS)) - .add(new SolrPluginInfo(CircuitBreakerManager.class, "circuitBreaker")) + .add(new SolrPluginInfo(CircuitBreakerManager.class, "circuitBreaker", MULTI_OK)) Review comment: This isnt the CircuitBreakerManager being pluggable -- this is CircuitBreakerManager being the central point of configuration for all circuit breakers. So yes, circuit breakers are individually pluggable, and no, CBM is no longer pluggable. However, CBM still handles all the configuration management for circuit breakers, hence this registration -- 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