ChrisHegarty commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2014949144
> We can decide if we want to backport it (should not be too hard). If yes, I will only backport to Java 21 (not 20 or 19). ++ Java 21 is fine. > I will add some getter to MMapDirectory so tests (we should add a test that it is really enabled for Linux and Mac) or users can figure out if madvise is used. I would add public static boolean MMapDirectory#supportsMadvise() and use it in tests around MMapDir. Thoughts? The platform may support madvise, but it is up to the calling code to set the IOContext appropriately for it to have any affect. I'm not sure what the user can do about any of this, other than log it? I wonder if it makes sense to add some short narrative to the IOContext javadoc - which would reference the new MMapDirectory#supportsMadvise. We kinda need MMapDirectory#supportsMadvise to assert the output of some of the tests - I can only think of checking the log output? Then we just need a handful of new tests to check the various combinations of IOContext. Additionally, I assume we can have unit tests for NativeAccess directly. Lemme take a quick look at this. -- 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