ChrisHegarty commented on code in PR #13196:
URL: https://github.com/apache/lucene/pull/13196#discussion_r1535309204


##########
lucene/core/src/java/org/apache/lucene/store/IOContext.java:
##########
@@ -54,14 +60,16 @@ public enum Context {
 
   public static final IOContext DEFAULT = new IOContext(Context.DEFAULT);
 
-  public static final IOContext READONCE = new IOContext(true, false);
+  public static final IOContext READONCE = new IOContext(true, false, false);
+
+  public static final IOContext READ = new IOContext(false, false, false);
 
-  public static final IOContext READ = new IOContext(false, false);
+  public static final IOContext LOAD = new IOContext(false, true, false);

Review Comment:
   > Should `LOAD` set `randomAccess=true` rather than `false`? We use it for 
small index files like the terms index and the stored fields index that have a 
random access pattern. 
   
   Logically, that seems right to me, but ...
   
   > (We may then want to exclude contexts whose `load=true` from 
`POSIX_MADV_RANDOM`.
   
   Yeah, this seems counter to the above (`LOAD` set `randomAccess=true`), but 
I get that it would be needed. Is this not already covered by `preload` ?



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

Reply via email to