kaivalnp opened a new issue, #15579: URL: https://github.com/apache/lucene/issues/15579
### Description ### Description The [`Lucene90CompoundFormat`](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundFormat.java) combines all files in a segment into a single CFS file. At the time of reading, it [opens the single combined file once](https://github.com/apache/lucene/blob/cf41f22142d3c8360a4d4f380a391e737eccfa88/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundReader.java#L76) using `Directory#openInput` and subsequent files are ["opened" by simply slicing that input](https://github.com/apache/lucene/blob/cf41f22142d3c8360a4d4f380a391e737eccfa88/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundReader.java#L149). For this format, the ability to [preload files from `MMapDirectory`](https://github.com/apache/lucene/blob/cf41f22142d3c8360a4d4f380a391e737eccfa88/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java#L387-L388) is binary -- we either preload the entire index (i.e. CFS file), or none of it.. (because preload happens per-file, in `MMapDirectory#openInput`) I wonder if we can move preloading functionality down from `MMapDirectory` to `MemorySegmentIndexInput` ([like madvise calls](https://github.com/apache/lucene/blob/cf41f22142d3c8360a4d4f380a391e737eccfa88/lucene/core/src/java/org/apache/lucene/store/MemorySegmentIndexInput.java#L577-L601)), allowing us to load chunks of a larger file based on `IOContext` -> hints -> [`PreloadHint`](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/store/PreloadHint.java). -- 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]
