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


##########
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:
   No, the context is passed already and the provider class could decide how to 
handle the IO context.
   
   But leave it as is for now. If we want two have different behaviour of 
MemeorySegments and MappedByteBuffer in future, I can refactor it.



-- 
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

Reply via email to