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


##########
lucene/core/src/java/org/apache/lucene/store/IOContext.java:
##########
@@ -44,24 +44,32 @@ public enum Context {
   /** This flag indicates that the file will be opened, then fully read 
sequentially then closed. */
   public final boolean readOnce;
 
+  /**
+   * This flag indicates that the file will be accessed randomly. If this flag 
is set, then readOnce
+   * will be false.
+   */
+  public final boolean randomAccess;
+
   /**
    * 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.
+   * guarantees on query latency. If this flag is set, then {@link 
#randomAccess} will be true.
    */
   public final boolean load;

Review Comment:
   maybe as a followup we can refactor these booleans? This file is very 
confusing to me...



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