jpountz commented on a change in pull request #758: LUCENE-8833: Add a #load() 
method to IndexInput to allow preloading file content into physical memory
URL: https://github.com/apache/lucene-solr/pull/758#discussion_r299507447
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/codecs/blocktree/FieldReader.java
 ##########
 @@ -98,7 +97,7 @@
           isFSTOffHeap = ((this.docCount != this.sumDocFreq) || 
openedFromWriter == false);
           break;
         case AUTO:
-          isFSTOffHeap = ((this.docCount != this.sumDocFreq) || 
openedFromWriter == false) && indexIn instanceof ByteBufferIndexInput;
+          isFSTOffHeap = ((this.docCount != this.sumDocFreq) || 
openedFromWriter == false) &&  indexIn.load(); // NOCOMMIT - should we do this 
should we do it all the time?
 
 Review comment:
   This looks reasonable to me. The extreme minority of expert users who don't 
want to preload this slice can still use a Directory wrapper whose index inputs 
don't do anything in load() and return `true`.

----------------------------------------------------------------
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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to