atris commented on a change in pull request #1214: LUCENE-9074: Slice 
Allocation Control Plane For Concurrent Searches
URL: https://github.com/apache/lucene-solr/pull/1214#discussion_r384911678
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
 ##########
 @@ -210,12 +216,27 @@ public IndexSearcher(IndexReader r, Executor executor) {
   public IndexSearcher(IndexReaderContext context, Executor executor) {
     assert context.isTopLevel: "IndexSearcher's ReaderContext must be topLevel 
for reader" + context.reader();
     reader = context.reader();
-    this.executor = executor;
+    this.sliceExecutionControlPlane = getSliceExecutionControlPlane(executor);
     this.readerContext = context;
     leafContexts = context.leaves();
     this.leafSlices = executor == null ? null : slices(leafContexts);
   }
 
+  /**
+   * We do this elaborate dance as to have only one constructor with a 
nullable second parameter
+   * See the next constructor for more clarification
+   * Only for testing
+   */
+  IndexSearcher(IndexReaderContext context, Executor executor,
 
 Review comment:
   It is needed since executor is a final member of IndexSearcher hence needs 
to be initialized? We could potentially always set it to null since it anyways 
wont be used but that seemed a bit counter intuitive. WDYT?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to