uschindler commented on code in PR #11917:
URL: https://github.com/apache/lucene/pull/11917#discussion_r1020409331
##########
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:
I would have moved the decission to those 2 places, no extra param needed:
-
https://github.com/apache/lucene/blob/57ac311c709da2f398ea73896eae158b1126c5b4/lucene/core/src/java/org/apache/lucene/store/MappedByteBufferIndexInputProvider.java#L77
-
https://github.com/apache/lucene/blob/57ac311c709da2f398ea73896eae158b1126c5b4/lucene/core/src/java19/org/apache/lucene/store/MemorySegmentIndexInputProvider.java#L54
But thats not important. This issue here was exactly "planned" when I made
the provider's signature. Currently the context is not used downstream.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]