You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2023/05/05 10:05:52 UTC

[lucene] branch branch_9x updated: Fix MMapDirectory documentation for Java 20 (#12265)

This is an automated email from the ASF dual-hosted git repository.

uschindler pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 15568ca1345 Fix MMapDirectory documentation for Java 20 (#12265)
15568ca1345 is described below

commit 15568ca1345616347e12b2e2b9518183ab182e7d
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Fri May 5 12:04:38 2023 +0200

    Fix MMapDirectory documentation for Java 20 (#12265)
---
 .../src/java/org/apache/lucene/store/MMapDirectory.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
index 5d23fb2f1ae..c2dabe9c3ce 100644
--- a/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
@@ -76,9 +76,9 @@ import org.apache.lucene.util.SuppressForbidden;
  *   <li>{@code permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";}
  * </ul>
  *
- * <p>On exactly <b>Java 19</b> this class will use the modern {@code MemorySegment} API which
- * allows to safely unmap (if you discover any problems with this preview API, you can disable it by
- * using system property {@link #ENABLE_MEMORY_SEGMENTS_SYSPROP}).
+ * <p>On exactly <b>Java 19</b> and <b>Java 20</b> this class will use the modern {@code
+ * MemorySegment} API which allows to safely unmap (if you discover any problems with this preview
+ * API, you can disable it by using system property {@link #ENABLE_MEMORY_SEGMENTS_SYSPROP}).
  *
  * <p><b>NOTE:</b> Accessing this class either directly or indirectly from a thread while it's
  * interrupted can close the underlying channel immediately if at the same time the thread is
@@ -123,7 +123,7 @@ public class MMapDirectory extends FSDirectory {
    * Default max chunk size:
    *
    * <ul>
-   *   <li>16 GiBytes for 64 bit <b>Java 19</b> JVMs
+   *   <li>16 GiBytes for 64 bit <b>Java 19</b> and <b>Java 20</b> JVMs
    *   <li>1 GiBytes for other 64 bit JVMs
    *   <li>256 MiBytes for 32 bit JVMs
    * </ul>
@@ -220,9 +220,9 @@ public class MMapDirectory extends FSDirectory {
    * files cannot be mapped. Using a lower chunk size makes the directory implementation a little
    * bit slower (as the correct chunk may be resolved on lots of seeks) but the chance is higher
    * that mmap does not fail. On 64 bit Java platforms, this parameter should always be large (like
-   * 1 GiBytes, or even larger with Java 19), as the address space is big enough. If it is larger,
-   * fragmentation of address space increases, but number of file handles and mappings is lower for
-   * huge installations with many open indexes.
+   * 1 GiBytes, or even larger with recent Java versions), as the address space is big enough. If it
+   * is larger, fragmentation of address space increases, but number of file handles and mappings is
+   * lower for huge installations with many open indexes.
    *
    * <p><b>Please note:</b> The chunk size is always rounded down to a power of 2.
    *