Skip to content

Commit

Permalink
Update bundled JDK to JDK-21.0.1 (opensearch-project#10576)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
(cherry picked from commit 0d7d1e9)
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Oct 30, 2023
1 parent 767bc0e commit 3d7aa59
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
import java.util.stream.Stream;

public class DistroTestPlugin implements Plugin<Project> {
private static final String SYSTEM_JDK_VERSION = "11.0.20+8";
private static final String SYSTEM_JDK_VERSION = "17.0.9+9";
private static final String SYSTEM_JDK_VENDOR = "adoptium";
private static final String GRADLE_JDK_VERSION = "17.0.8+7";
private static final String GRADLE_JDK_VERSION = "17.0.9+9";
private static final String GRADLE_JDK_VENDOR = "adoptium";

// all distributions used by distro tests. this is temporary until tests are per distribution
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ opensearch = 2.12.0
lucene = 9.8.0

bundled_jdk_vendor = adoptium
bundled_jdk = 17.0.8+7
bundled_jdk = 21.0.1+12

# optional dependencies
spatial4j = 0.7
Expand Down
2 changes: 1 addition & 1 deletion distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ${error.file}

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

# HDFS ForkJoinPool.common() support by SecurityManager
-Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm.SecuredForkJoinWorkerThreadFactory
27 changes: 17 additions & 10 deletions libs/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,23 @@ tasks.named('forbiddenApisMain').configure {
tasks.named("thirdPartyAudit").configure {
ignoreMissingClasses(
// from log4j
'org.osgi.framework.Bundle',
'org.osgi.framework.BundleActivator',
'org.osgi.framework.BundleContext',
'org.osgi.framework.BundleEvent',
'org.osgi.framework.FrameworkUtil',
'org.osgi.framework.ServiceReference',
'org.osgi.framework.ServiceRegistration',
'org.osgi.framework.SynchronousBundleListener',
'org.osgi.framework.wiring.BundleWire',
'org.osgi.framework.wiring.BundleWiring'
*[
'org.osgi.framework.Bundle',
'org.osgi.framework.BundleActivator',
'org.osgi.framework.BundleContext',
'org.osgi.framework.BundleEvent',
'org.osgi.framework.SynchronousBundleListener',
'org.osgi.framework.wiring.BundleWire',
'org.osgi.framework.wiring.BundleWiring',
] + (BuildParams.runtimeJavaVersion < JavaVersion.VERSION_20) ? [] : [
'jdk.incubator.vector.ByteVector',
'jdk.incubator.vector.FloatVector',
'jdk.incubator.vector.IntVector',
'jdk.incubator.vector.ShortVector',
'jdk.incubator.vector.Vector',
'jdk.incubator.vector.VectorOperators',
'jdk.incubator.vector.VectorSpecies'
]
)
}

Expand Down
10 changes: 10 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ tasks.named("processResources").configure {

tasks.named("thirdPartyAudit").configure {
ignoreMissingClasses(
*[
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
'com.fasterxml.jackson.databind.ObjectMapper',

Expand Down Expand Up @@ -355,6 +356,15 @@ tasks.named("thirdPartyAudit").configure {
'com.google.common.geometry.S2Point',
'com.google.common.geometry.S2$Metric',
'com.google.common.geometry.S2LatLng'
] + (BuildParams.runtimeJavaVersion < JavaVersion.VERSION_20) ? [] : [
'jdk.incubator.vector.ByteVector',
'jdk.incubator.vector.FloatVector',
'jdk.incubator.vector.IntVector',
'jdk.incubator.vector.ShortVector',
'jdk.incubator.vector.Vector',
'jdk.incubator.vector.VectorOperators',
'jdk.incubator.vector.VectorSpecies'
]
)
ignoreViolations(
'com.google.protobuf.MessageSchema',
Expand Down

0 comments on commit 3d7aa59

Please sign in to comment.