[ 
https://issues.apache.org/jira/browse/SOLR-14588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17146601#comment-17146601
 ] 

Andrzej Bialecki edited comment on SOLR-14588 at 6/26/20, 7:45 PM:
-------------------------------------------------------------------

[~atris] Thanks for adding the javadocs and descriptions in the config files, 
this is helpful.

However, the documentation is still somewhat confusing. "max JVM usage based 
circuit breaker" in the CHANGES.txt doesn't mention the most important detail 
that it's the *heap* usage that is monitored.

The sections in Solr Ref Guide don't sufficiently explain what's the purpose, 
cost and consequences of using this functionality - and that's the most 
important kind of documentation for the end users (not devs) because they will 
use this doc for learning and understanding what this feature does and what are 
the consequences of using it.

For example, in {{query-settings-in-solrconfig.adoc}} it says: "This parameter 
allows enabling circuit breakers for query control." It doesn't say anything 
about why and when users should configure it, and how it potentially affects 
the query responses if tripped, and how / when it returns to normal operation. 
Also, it says "Memory threshold in percentage for JVM heap usage", which is 
imprecise - it should say what it is a percentage of (the max heap defined by 
-Xmx), etc, etc.

I also have some reservations regarding the implementation of 
{{CircuitBreakerManager. checkAllCircuitBreakers()}} - this method is called 
for every search request but it needlessly allocates a new HashMap on each call 
even if no breaker was tripped. Maybe there should be two methods - one to 
simply return a boolean (with zero allocations) if any breaker was tripped (and 
this can even short-circuit the checking of all breakers as soon as one is 
tripped), and another method to actually get the ones that are tripped? Or keep 
one method but lazily allocate the HashMap only when needed.


was (Author: ab):
[~atris] Thanks for adding the javadocs and descriptions in the config files, 
this is helpful.

However, the documentation is still somewhat confusing. "max JVM usage based 
circuit breaker" in the CHANGES.txt doesn't mention the most important detail 
that it's the *heap* usage that is monitored.

The sections in Solr Ref Guide don't sufficiently explain what's the purpose, 
cost and consequences of using this functionality - and that's the most 
important kind of documentation for the end users (not devs) because they will 
use this doc for learning and understanding what this feature does and what are 
the consequences of using it.

For example, in {{query-settings-in-solrconfig.adoc}} it says: "This parameter 
allows enabling circuit breakers for query control." It doesn't say anything 
about why and when users should configure it, and how it potentially affects 
the query responses if tripped, and how / when it returns to normal operation. 
Also, it says "Memory threshold in percentage for JVM heap usage", which is 
imprecise - it should say what it is a percentage of (the max heap defined by 
-Xmx), etc, etc.

I also have some reservations regarding the implementation of 
{{CircuitBreakerManager. checkAllCircuitBreakers()}} - this method is called 
for every search request but it needlessly allocates a new HashMap on each call 
even if no breaker was tripped. Maybe there should be two methods - one to 
simply return a boolean (with zero allocations) if any breaker was tripped (and 
this can even short-circuit the checking of all breakers as soon as one is 
tripped), and another method to actually get the ones that are tripped?

> Circuit Breakers Infrastructure and Real JVM Based Circuit Breaker
> ------------------------------------------------------------------
>
>                 Key: SOLR-14588
>                 URL: https://issues.apache.org/jira/browse/SOLR-14588
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Atri Sharma
>            Assignee: Atri Sharma
>            Priority: Major
>          Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> This Jira tracks addition of circuit breakers in the search path and 
> implements JVM based circuit breaker which rejects incoming search requests 
> if the JVM heap usage exceeds a defined percentage.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to