Skip to content

Commit

Permalink
add jdk.incubator.vector module support for JDK 20+ (opensearch-proje…
Browse files Browse the repository at this point in the history
…ct#8601)

* add jdk.incubator.vector module support for JDK 20+

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

Signed-off-by: Nicholas Walter Knize <[email protected]>

* update changelog and fix typo

Signed-off-by: Nicholas Walter Knize <[email protected]>

---------

Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: sahil buddharaju <[email protected]>
  • Loading branch information
nknize authored and sahil buddharaju committed Jul 18, 2023
1 parent bb71404 commit afc4d27
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 @@ -102,6 +102,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Support transport action names when registering NamedRoutes ([#7957](https://github.com/opensearch-project/OpenSearch/pull/7957))
- Create concept of persistent ThreadContext headers that are unstashable ([#8291]()https://github.com/opensearch-project/OpenSearch/pull/8291)
- Enable Partial Flat Object ([#7997](https://github.com/opensearch-project/OpenSearch/pull/7997))
- Add jdk.incubator.vector module support for JDK 20+ ([#8601](https://github.com/opensearch-project/OpenSearch/pull/8601))

### Dependencies
- Bump `com.azure:azure-storage-common` from 12.21.0 to 12.21.1 (#7566, #7814)
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,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 @@ -78,3 +78,7 @@ ${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

0 comments on commit afc4d27

Please sign in to comment.