romseygeek commented on code in PR #16970:
URL: https://github.com/apache/lucene/pull/16970#discussion_r4468462012
##########
lucene/core/src/java/org/apache/lucene/store/IOContext.java:
##########
@@ -64,6 +66,14 @@ interface FileOpenHint {}
@SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
IOContext READONCE = new DefaultIOContext(DataAccessHint.SEQUENTIAL,
ReadOnceHint.INSTANCE);
+ /**
+ * A default context for reads that are all performed in the same thread as
the one that opens the
+ * underlying storage, which lets the directory confine the input to that
thread. It carries no
+ * {@link DataAccessHint}, so callers can set the access pattern with {@link
#overrideHints}.
+ */
+ @SuppressWarnings("ClassInitializationDeadlock") // FIXME: may cause hangs!
+ IOContext READONCE_SINGLETHREAD = new
DefaultIOContext(ReadOnceHint.INSTANCE);
Review Comment:
Renaming it would work. Its only use in lucene is in MmapDirectory, to
decide whether or not to use a confined Arena.
--
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]