Skip to content

Commit

Permalink
add jdk.incubator.vector module support for JDK 20+ (#8601) (#9494)
Browse files Browse the repository at this point in the history
* add jdk.incubator.vector module support for JDK 20+

Adds support for the incubating jdk vector package (PANAMA) when using
jdk 20+ runtime.



* update changelog and fix typo



---------


(cherry picked from commit 62b66e5)

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Heemin Kim <heemin@amazon.com>
Co-authored-by: Nick Knize <nknize@apache.org>
  • Loading branch information
heemin32 and nknize committed Aug 23, 2023
1 parent 4eedfa2 commit 2ffbcc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- [Remote Store] Add Segment download stats to remotestore stats API ([#8718](https://github.com/opensearch-project/OpenSearch/pull/8718))
- [Remote Store] Add remote segment transfer stats on NodesStats API ([#9168](https://github.com/opensearch-project/OpenSearch/pull/9168))
- [Segment Replication] Support realtime reads for GET requests ([#9212](https://github.com/opensearch-project/OpenSearch/pull/9212))
- Add jdk.incubator.vector module support for JDK 20+ ([#8601](https://github.com/opensearch-project/OpenSearch/pull/8601))

### Dependencies
- Bump `org.apache.logging.log4j:log4j-core` from 2.17.1 to 2.20.0 ([#8307](https://github.com/opensearch-project/OpenSearch/pull/8307))
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ gradle.projectsEvaluated {
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_17) {
task.jvmArgs += ["-Djava.security.manager=allow"]
}
if (BuildParams.runtimeJavaVersion >= JavaVersion.VERSION_20) {
task.jvmArgs += ["--add-modules=jdk.incubator.vector"]
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,9 @@ ${error.file}
# Explicitly allow security manager (https://bugs.openjdk.java.net/browse/JDK-8270380)
18-:-Djava.security.manager=allow

# JDK 20+ Incubating Vector Module for SIMD optimizations;
# disabling may reduce performance on vector optimized lucene
20:--add-modules=jdk.incubator.vector

# HDFS ForkJoinPool.common() support by SecurityManager
-Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm.SecuredForkJoinWorkerThreadFactory

0 comments on commit 2ffbcc4

Please sign in to comment.