Skip to content

Commit

Permalink
fix jvm options
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhmaurya committed Oct 3, 2024
1 parent c04cb3e commit 25bf6c6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,8 @@ public void beforeStart() {
firstNode.setTransportPort(String.valueOf(transportPort));
transportPort++;
firstNode.setting("discovery.seed_hosts", LOCALHOST_ADDRESS_PREFIX + DEFAULT_TRANSPORT_PORT);

cluster.setPreserveDataDir(preserveData);
for (OpenSearchNode node : cluster.getNodes()) {

if (node != firstNode) {
node.setHttpPort(String.valueOf(httpPort));
httpPort++;
Expand Down Expand Up @@ -197,7 +195,6 @@ public void beforeStart() {
if (keystorePassword.length() > 0) {
node.keystorePassword(keystorePassword);
}
node.jvmArgs("--add-opens=java.base/java.nio=ALL-UNNAMED");
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ ${error.file}

# HDFS ForkJoinPool.common() support by SecurityManager
-Djava.util.concurrent.ForkJoinPool.common.threadFactory=org.opensearch.secure_sm.SecuredForkJoinWorkerThreadFactory
-Dio.netty.tryReflectionSetAccessible=true
-XX:MaxDirectMemorySize=1g
--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
8 changes: 0 additions & 8 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,6 @@ tasks.test {
jvmArgs += ["--add-opens", "java.base/java.nio.file=ALL-UNNAMED"]
}
}

tasks.test {
//if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_1_8) {
jvmArgs += ["--add-opens", "java.base/java.nio.channels=ALL-UNNAMED"]
jvmArgs += ["--add-opens", "java.base/java.net=ALL-UNNAMED"]
//}
}

tasks.named("sourcesJar").configure {
// Ignore duplicates for protobuf generated code (main and generatedSources).
filesMatching("**/proto/*") {
Expand Down

0 comments on commit 25bf6c6

Please sign in to comment.