Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
18.10.0-rc-1
-
None
-
Unknown
-
Description
Steps to reproduce
- Start XWiki with the embedded Solr (the default) on Java 21 or later
- Observe the XWiki console
Expected results
No (other) warning is displayed.
Actual results
On Java 21 or 22:
org.apache.lucene.internal.vectorization.VectorizationProvider lookup WARNING: Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.
On Java 23 or later:
org.apache.lucene.internal.vectorization.VectorizationProvider lookup WARNING: You are running with Java 23 or later. To make full use of the Vector API, please update Apache Lucene.
Details
Since Lucene 9.12 (upgraded in XWIKI-21954), the default postings format decodes the postings through Lucene's vectorization support, so this warning is displayed at every startup. With Lucene 9.8, only dense vector fields (not used by XWiki) were using it.
There is no functional impact: without the jdk.incubator.vector module, Lucene uses its scalar implementation and the search results are the same, only an optimization of the postings decoding is missed.
Possible solutions:
- Lower the level of the org.apache.lucene.internal.vectorization logger. Lucene uses java.util.logging, which is not redirected to SLF4J/logback in XWiki, so this requires either bridging it or setting the level programmatically.
- Pass --add-modules jdk.incubator.vector to the JVM. It enables the optimization on Java 21 and 22, but the JVM then displays its own warning about using an incubator module.
On Java 23 or later, only Lucene 10 (i.e. Solr 10) will be able to use the Vector API.
Attachments
Issue Links
- is caused by
-
XWIKI-21954 Upgrade to Solr 9.11.0 and Lucene 9.12.3
-
- Open
-
- is related to
-
XWIKI-25454 Upgrade to Solr 10
-
- Open
-
- relates to
-
XWIKI-22012 Lucene related message in logs when starting XWiki 16.2.0 RC1 on Java 21
-
- Open
-