uschindler opened a new pull request, #12066: URL: https://github.com/apache/lucene/pull/12066
This is the next step towards MemorySegments: Currently you can disable the unmap hack with an instance setter on MMapDirectory. This makes no sense at all, because it either works or not. If it should be disabled, it needs to be global. This is the main reason why I want to change it here: The code, especially around the provider uses crazy checks and passes per-instance booleans around, just to have it separate configurable. In addition as the setting will go away likely with Lucene 10 / Java 21, it is good to deprecate it now, so we don't have to live forever with this crap. When adding MemorySegment support, I added a system property to disable usage of Java 19 project Panama in PR #12062 so to make it consistent, the same is done here. Instead of a per instance configuration, this can be disabled from outside. It is also not a good idea to make a setting like this configurable from inside the JVM, so a system operator can enable/disable it based on the used JDK. When we remove the byte buffer index input, the sysprop will silently disappear, the same for the memory segment one. So theres no backwards compatibility break. In Lucene 9.x the instance setter will be deprecated (to make code still compile), but it will refuse to change the setting and throws UOE that refers to the system property. Once this was backported to 9.x branch, I will remove the deprecated methods. -- 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