You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2019/12/02 16:26:39 UTC

[GitHub] [lucene-solr] atris commented on a change in pull request #1049: LUCENE-9074: Slice Allocation Circuit Breakers in IndexSearcher

atris commented on a change in pull request #1049: LUCENE-9074: Slice Allocation Circuit Breakers in IndexSearcher
URL: https://github.com/apache/lucene-solr/pull/1049#discussion_r352693896
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
 ##########
 @@ -316,8 +342,8 @@ public QueryCachingPolicy getQueryCachingPolicy() {
     long docSum = 0;
     List<LeafReaderContext> group = null;
     for (LeafReaderContext ctx : sortedLeaves) {
-      if (ctx.reader().maxDoc() > maxDocsPerSlice) {
-        assert group == null;
+      if (ctx.reader().maxDoc() > maxDocsPerSlice &&
+          (isSliceAllocationCBNull || sliceAllocationCircuitBreaker.shouldProceed())) {
 
 Review comment:
   I felt that this was more readable since the actual check is a mouthful but do not have a strong preference. Fixed, thanks

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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