uschindler commented on code in PR #11930: URL: https://github.com/apache/lucene/pull/11930#discussion_r1021939686
########## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ########## @@ -41,34 +41,47 @@ public enum Context { public final FlushInfo flushInfo; + /** This flag indicates that the file will be opened, then fully read sequentially then closed. */ public final boolean readOnce; + /** + * This flag is used for files that are a small fraction of the total index size and are expected + * to be heavily accessed in random-access fashion. Some {@link Directory} implementations may + * choose to load such files into physical memory (e.g. Java heap) as a way to provide stronger + * guarantees on query latency. + */ + public final boolean load; Review Comment: This description looks good. ########## lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90DocValuesProducer.java: ########## @@ -82,7 +83,7 @@ final class Lucene90DocValuesProducer extends DocValuesProducer { merging = false; // read in the entries from the metadata file. - try (ChecksumIndexInput in = state.directory.openChecksumInput(metaName, state.context)) { + try (ChecksumIndexInput in = state.directory.openChecksumInput(metaName, IOContext.READONCE)) { Review Comment: I was wondering about this earlier, but it is really nice you fixed this,too! -- 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