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 2022/11/11 14:29:11 UTC

[GitHub] [lucene] jpountz commented on a diff in pull request #11917: Automatically preload index files that are both tiny and very hot.

jpountz commented on code in PR #11917:
URL: https://github.com/apache/lucene/pull/11917#discussion_r1020267346


##########
lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java:
##########
@@ -235,7 +235,7 @@ public IndexInput openInput(String name, IOContext context) throws IOException {
     ensureOpen();
     ensureCanRead(name);
     Path path = directory.resolve(name);
-    return PROVIDER.openInput(path, context, chunkSizePower, preload, useUnmapHack);
+    return PROVIDER.openInput(path, context, chunkSizePower, preload || context.load, useUnmapHack);

Review Comment:
   > So I would move the || context.load to somewhere in MappedByteBufferIndexInputProvider and MemorySegmentIndexInputProvider so they can have different code.
   
   Do you mean making it a separate argument?



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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