Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jdk.unsupported module to Luke startup script [LUCENE-10287] #11323

Closed
asfimport opened this issue Dec 5, 2021 · 13 comments
Closed

Add jdk.unsupported module to Luke startup script [LUCENE-10287] #11323

asfimport opened this issue Dec 5, 2021 · 13 comments

Comments

@asfimport
Copy link

asfimport commented Dec 5, 2021

See my note on the JDK 9.0 release: When you start Luke (in module mode, as done by default), it won't use MMapDirectory when opening indexes. The reason is simple: It can't see sun.misc.Unsafe, which is needed to unmap mapped byte buffers. It will silently disable itsself (as it is not a hard dependency).

By default we should pass the "jdk.unsupported" module when starting Luke.

In case of a respin, this should be backported.


Migrated from LUCENE-10287 by Uwe Schindler (@uschindler), resolved Jan 03 2022
Linked issues:

Pull requests: #517, #522

@asfimport
Copy link
Author

Uwe Schindler (@uschindler) (migrated from JIRA)

I opened PR: #517

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit 9cb16df in lucene's branch refs/heads/main from Uwe Schindler
https://gitbox.apache.org/repos/asf?p=lucene.git;h=9cb16df

LUCENE-10287: Fix startup script of module enabled Luke to pass jdk.unsupported as module (#517)

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit 8e7fbca in lucene's branch refs/heads/branch_9x from Uwe Schindler
https://gitbox.apache.org/repos/asf?p=lucene.git;h=8e7fbca

LUCENE-10287: Fix startup script of module enabled Luke to pass jdk.unsupported as module (#517)

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit ec57641 in lucene's branch refs/heads/main from Uwe Schindler
https://gitbox.apache.org/repos/asf?p=lucene.git;h=ec57641

LUCENE-10287: Add changes entry

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit d36c70c in lucene's branch refs/heads/branch_9x from Uwe Schindler
https://gitbox.apache.org/repos/asf?p=lucene.git;h=d36c70c

LUCENE-10287: Add changes entry

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit 35eff44 in lucene's branch refs/heads/main from Tomoko Uchida
https://gitbox.apache.org/repos/asf?p=lucene.git;h=35eff44

LUCENE-10287: Re-add abstract FSDirectory class as a supported directory (#522)

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit 3eadfd4 in lucene's branch refs/heads/branch_9x from Tomoko Uchida
https://gitbox.apache.org/repos/asf?p=lucene.git;h=3eadfd4

LUCENE-10287: Re-add abstract FSDirectory class as a supported directory (#522)

@asfimport
Copy link
Author

Dawid Weiss (@dweiss) (migrated from JIRA)

I've added an integration layer test to the jms PR branch to verify mmap can be loaded and confirmed it fails without this patch:

org.apache.lucene.distribution.TestModularLayer > test suite's output saved to C:\Work\apache\lucene\lucene\distribution-tests\build\test-results\test\outputs\OUTPUT-org.apache.lucene.distribution.TestModularLayer.txt, copied below:
   >     java.lang.AssertionError:
   >     Expecting map:
   >       {"hello"="world", "unmap.supported"="false"}
   >     to contain only:
   >       ["unmap.supported"="true", "hello"="world"]
   >     map entries not found:
   >       ["unmap.supported"="true"]
   >     and map entries not expected:
   >       ["unmap.supported"="false"]
   >         at org.apache.lucene.distribution.TestModularLayer....

@asfimport
Copy link
Author

Dawid Weiss (@dweiss) (migrated from JIRA)

We could verify SPI sanity in a similar way, btw.

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit 8b5887f in lucene's branch refs/heads/main from Uwe Schindler
https://gitbox.apache.org/repos/asf?p=lucene.git;h=8b5887f

LUCENE-10287: Remove obsolete changes entry (we now have a warning and won't rely on the module when staring luke)

@asfimport
Copy link
Author

ASF subversion and git services (migrated from JIRA)

Commit 9a19781 in lucene's branch refs/heads/branch_9x from Uwe Schindler
https://gitbox.apache.org/repos/asf?p=lucene.git;h=9a19781

LUCENE-10287: Remove obsolete changes entry (we now have a warning and won't rely on the module when staring luke)

@asfimport
Copy link
Author

Uwe Schindler (@uschindler) (migrated from JIRA)

Reopen to close as won't fix

@asfimport
Copy link
Author

Uwe Schindler (@uschindler) (migrated from JIRA)

We have now a warning and we won't rely on the module to be existent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants