Skip to content

Commit c8f1444

Browse files
committed
Merge remote-tracking branch 'upstream/9.0' into entitlements/always-enabled-minimal
2 parents 30d8a34 + 0c7ccb6 commit c8f1444

File tree

151 files changed

+3551
-1175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+3551
-1175
lines changed

distribution/src/bin/elasticsearch-cli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exec \
1919
-Des.path.home="$ES_HOME" \
2020
-Des.path.conf="$ES_PATH_CONF" \
2121
-Des.distribution.type="$ES_DISTRIBUTION_TYPE" \
22+
-Des.java.type="$JAVA_TYPE" \
2223
-cp "$LAUNCHER_CLASSPATH" \
2324
org.elasticsearch.launcher.CliToolLauncher \
2425
"$@"

distribution/src/bin/elasticsearch-cli.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set LAUNCHER_CLASSPATH=%ES_HOME%/lib/*;%ES_HOME%/lib/cli-launcher/*
1818
-Des.path.home="%ES_HOME%" ^
1919
-Des.path.conf="%ES_PATH_CONF%" ^
2020
-Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^
21+
-Des.java.type="%JAVA_TYPE%" ^
2122
-cp "%LAUNCHER_CLASSPATH%" ^
2223
org.elasticsearch.launcher.CliToolLauncher ^
2324
%*

distribution/src/bin/elasticsearch-env

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,17 @@ else
5555
JAVA_TYPE="bundled JDK"
5656
fi
5757

58-
# do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default)
58+
# do not let JAVA_TOOL_OPTIONS OR _JAVA_OPTIONS slip in (as the JVM does by default)
5959
if [ ! -z "$JAVA_TOOL_OPTIONS" ]; then
60-
echo "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
60+
echo -n "warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS; "
61+
echo "pass JVM parameters via ES_JAVA_OPTS"
6162
unset JAVA_TOOL_OPTIONS
6263
fi
64+
if [ ! -z "$_JAVA_OPTIONS" ]; then
65+
echo -n "warning: ignoring _JAVA_OPTIONS=$_JAVA_OPTIONS; "
66+
echo "pass JVM parameters via ES_JAVA_OPTS"
67+
unset _JAVA_OPTIONS
68+
fi
6369

6470
# warn that we are not observing the value of JAVA_HOME
6571
if [ ! -z "$JAVA_HOME" ]; then

distribution/src/bin/elasticsearch-env.bat

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,17 @@ if defined ES_JAVA_HOME (
5858
set JAVA_TYPE=bundled JDK
5959
)
6060

61-
rem do not let JAVA_TOOL_OPTIONS slip in (as the JVM does by default)
61+
rem do not let JAVA_TOOL_OPTIONS or _JAVA_OPTIONS slip in (as the JVM does by default)
6262
if defined JAVA_TOOL_OPTIONS (
63-
echo warning: ignoring JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS%
63+
(echo|set /p=ignoring JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS%; )
64+
echo pass JVM parameters via ES_JAVA_OPTS
6465
set JAVA_TOOL_OPTIONS=
6566
)
67+
if defined _JAVA_OPTIONS (
68+
(echo|set /p=ignoring _JAVA_OPTIONS=%_JAVA_OPTIONS%; )
69+
echo pass JVM parameters via ES_JAVA_OPTS
70+
set _JAVA_OPTIONS=
71+
)
6672

6773
rem warn that we are not observing the value of $JAVA_HOME
6874
if defined JAVA_HOME (

distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/SystemJvmOptions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ final class SystemJvmOptions {
2525

2626
static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, String> sysprops) {
2727
String distroType = sysprops.get("es.distribution.type");
28+
String javaType = sysprops.get("es.java.type");
2829
boolean isHotspot = sysprops.getOrDefault("sun.management.compiler", "").contains("HotSpot");
2930

3031
boolean useEntitlements = true;
@@ -66,8 +67,9 @@ static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, St
6667
"-Djava.locale.providers=CLDR",
6768
// Enable vectorization for whatever version we are running. This ensures we use vectorization even when running EA builds.
6869
"-Dorg.apache.lucene.vectorization.upperJavaFeatureVersion=" + Runtime.version().feature(),
69-
// Pass through distribution type
70-
"-Des.distribution.type=" + distroType
70+
// Pass through distribution type and java type
71+
"-Des.distribution.type=" + distroType,
72+
"-Des.java.type=" + javaType
7173
),
7274
maybeEnableNativeAccess(useEntitlements),
7375
maybeOverrideDockerCgroup(distroType),

docs/changelog/124651.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124651
2+
summary: "Fix system data streams to be restorable from a snapshot"
3+
area: Infra/Core
4+
type: bug
5+
issues: [89261]

docs/changelog/124732.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124732
2+
summary: Prevent rare starvation bug when using scaling `EsThreadPoolExecutor` with empty core pool size.
3+
area: Infra/Core
4+
type: bug
5+
issues:
6+
- 124667

docs/changelog/124843.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124843
2+
summary: Ignore _JAVA_OPTIONS
3+
area: Infra/CLI
4+
type: enhancement
5+
issues: []

docs/changelog/124873.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124873
2+
summary: Restore V8 REST compatibility around highlight `force_source` parameter
3+
area: Highlighting
4+
type: bug
5+
issues: []

docs/changelog/124884.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124884
2+
summary: System data streams are not being upgraded in the feature migration API
3+
area: Infra/Core
4+
type: bug
5+
issues:
6+
- 122949

0 commit comments

Comments
 (0)