janhoy commented on code in PR #1919: URL: https://github.com/apache/solr/pull/1919#discussion_r1324459082
########## solr/core/src/java/org/apache/solr/util/circuitbreaker/CircuitBreakerRegistry.java: ########## @@ -62,9 +81,11 @@ public void deregisterAll() { */ public List<CircuitBreaker> checkTripped(SolrRequestType requestType) { List<CircuitBreaker> triggeredCircuitBreakers = null; + final List<CircuitBreaker> breakersOfType = new ArrayList<>(); - for (CircuitBreaker circuitBreaker : - circuitBreakerMap.getOrDefault(requestType, Collections.emptyList())) { + breakersOfType.addAll(circuitBreakerMap.getOrDefault(requestType, Collections.emptyList())); + breakersOfType.addAll(globalCircuitBreakerMap.getOrDefault(requestType, Collections.emptyList())); + for (CircuitBreaker circuitBreaker : breakersOfType) { Review Comment: I'm sure it would be possible to stream the two maps in a more efficient streaming fashion to avoid extra list, but this is just a POC :) -- 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