uschindler commented on code in PR #11917: URL: https://github.com/apache/lucene/pull/11917#discussion_r1019662247
########## 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: See my last message: It may be better in future to leave the decission to preload or map to the implementation of the provider. For exactly that reason the context is passed to the provider! So I would move the `|| context.load` to somewhere in MappedByteBufferIndexInputProvider and MemorySegmentIndexInputProvider so they can have different code. Maybe also rename "load" to something else because it is up to implementation how to guarantee how something is "sticked to memory". -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org