Skip to content

Commit a64a1b4

Browse files
authored
Merge branch 'main' into script_sort_support_parallel_collection
2 parents f204e92 + 9866a67 commit a64a1b4

File tree

1,908 files changed

+44134
-26823
lines changed

Some content is hidden

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

1,908 files changed

+44134
-26823
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -226,5 +226,8 @@ indent_size = 2
226226
[*.{xsd,xml}]
227227
indent_size = 4
228228

229+
[verification-metadata.xml]
230+
indent_size = 3
231+
229232
[*.{csv,sql}-spec]
230233
trim_trailing_whitespace = false

.gitattributes

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBasePar
1313
x-pack/plugin/esql/src/main/generated/** linguist-generated=true
1414
x-pack/plugin/esql/src/main/generated-src/** linguist-generated=true
1515

16-
# ESQL functions docs are autogenerated. More information at `docs/reference/esql/functions/README.md`
17-
docs/reference/esql/functions/*/** linguist-generated=true
16+
# ESQL functions docs are autogenerated. More information at `docs/reference/query-languages/esql/README.md`
17+
docs/reference/query-languages/esql/_snippets/functions/*/** linguist-generated=true
18+
#docs/reference/query-languages/esql/_snippets/operators/*/** linguist-generated=true
19+
docs/reference/query-languages/esql/images/** linguist-generated=true
20+
docs/reference/query-languages/esql/kibana/** linguist-generated=true
1821

Could

Whitespace-only changes.

benchmarks/build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ base {
2525
archivesName = 'elasticsearch-benchmarks'
2626
}
2727

28-
tasks.named("test").configure { enabled = false }
2928
tasks.named("javadoc").configure { enabled = false }
3029

3130
configurations {
@@ -52,8 +51,10 @@ dependencies {
5251
api "org.openjdk.jmh:jmh-core:$versions.jmh"
5352
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
5453
// Dependencies of JMH
55-
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.4'
54+
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.2'
5655
runtimeOnly 'org.apache.commons:commons-math3:3.6.1'
56+
57+
testImplementation(project(':test:framework'))
5758
}
5859

5960
// enable the JMH's BenchmarkProcessor to generate the final benchmark classes

benchmarks/src/main/java/org/elasticsearch/benchmark/compute/operator/EvalBenchmark.java

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import org.apache.lucene.util.BytesRef;
1313
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
14+
import org.elasticsearch.common.logging.LogConfigurator;
1415
import org.elasticsearch.common.settings.Settings;
1516
import org.elasticsearch.common.util.BigArrays;
1617
import org.elasticsearch.compute.data.Block;
@@ -28,6 +29,8 @@
2829
import org.elasticsearch.compute.operator.EvalOperator;
2930
import org.elasticsearch.compute.operator.Operator;
3031
import org.elasticsearch.core.TimeValue;
32+
import org.elasticsearch.logging.LogManager;
33+
import org.elasticsearch.logging.Logger;
3134
import org.elasticsearch.xpack.esql.core.expression.Expression;
3235
import org.elasticsearch.xpack.esql.core.expression.FieldAttribute;
3336
import org.elasticsearch.xpack.esql.core.expression.FoldContext;
@@ -89,9 +92,16 @@ public class EvalBenchmark {
8992
static final DriverContext driverContext = new DriverContext(BigArrays.NON_RECYCLING_INSTANCE, blockFactory);
9093

9194
static {
95+
LogConfigurator.configureESLogging();
9296
// Smoke test all the expected values and force loading subclasses more like prod
97+
selfTest();
98+
}
99+
100+
static void selfTest() {
101+
Logger log = LogManager.getLogger(EvalBenchmark.class);
93102
try {
94103
for (String operation : EvalBenchmark.class.getField("operation").getAnnotationsByType(Param.class)[0].value()) {
104+
log.info("self testing {}", operation);
95105
run(operation);
96106
}
97107
} catch (NoSuchFieldException e) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
package org.elasticsearch.benchmark.compute.operator;
11+
12+
import org.elasticsearch.test.ESTestCase;
13+
14+
public class EvalBenchmarkTests extends ESTestCase {
15+
public void testSelfTest() {
16+
EvalBenchmark.selfTest();
17+
}
18+
}

build-tools-internal/src/main/groovy/elasticsearch.bwc-test.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ plugins.withType(InternalJavaRestTestPlugin) {
4747
tasks.withType(StandaloneRestIntegTestTask).configureEach {
4848
testClassesDirs = sourceSets.javaRestTest.output.classesDirs
4949
classpath = sourceSets.javaRestTest.runtimeClasspath
50-
usesDefaultDistribution()
50+
usesDefaultDistribution("BWC tests require full distribution for now")
5151
}
5252
}
5353

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java

-26
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
import org.elasticsearch.gradle.internal.test.ClusterFeaturesMetadataPlugin;
1818
import org.elasticsearch.gradle.plugin.PluginBuildPlugin;
1919
import org.elasticsearch.gradle.plugin.PluginPropertiesExtension;
20-
import org.elasticsearch.gradle.testclusters.ElasticsearchCluster;
21-
import org.elasticsearch.gradle.testclusters.TestClustersPlugin;
2220
import org.elasticsearch.gradle.util.GradleUtils;
23-
import org.gradle.api.NamedDomainObjectContainer;
2421
import org.gradle.api.Plugin;
2522
import org.gradle.api.Project;
2623

@@ -81,29 +78,6 @@ public void doCall() {
8178
if (isModule == false || isXPackModule) {
8279
addNoticeGeneration(project, extension);
8380
}
84-
project.afterEvaluate(p -> {
85-
@SuppressWarnings("unchecked")
86-
NamedDomainObjectContainer<ElasticsearchCluster> testClusters = (NamedDomainObjectContainer<ElasticsearchCluster>) project
87-
.getExtensions()
88-
.getByName(TestClustersPlugin.EXTENSION_NAME);
89-
p.getExtensions().getByType(PluginPropertiesExtension.class).getExtendedPlugins().forEach(pluginName -> {
90-
// Auto add any dependent modules
91-
findModulePath(project, pluginName).ifPresent(
92-
path -> testClusters.configureEach(elasticsearchCluster -> elasticsearchCluster.module(path))
93-
);
94-
});
95-
});
96-
}
97-
98-
Optional<String> findModulePath(Project project, String pluginName) {
99-
return project.getRootProject()
100-
.getAllprojects()
101-
.stream()
102-
.filter(p -> GradleUtils.isModuleProject(p.getPath()))
103-
.filter(p -> p.getPlugins().hasPlugin(PluginBuildPlugin.class))
104-
.filter(p -> p.getExtensions().getByType(PluginPropertiesExtension.class).getName().equals(pluginName))
105-
.findFirst()
106-
.map(Project::getPath);
10781
}
10882

10983
/**

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/RestrictedBuildApiService.java

-6
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
4949
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-ec2");
5050
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-gce");
5151
map.put(LegacyRestTestBasePlugin.class, ":plugins:mapper-annotated-text");
52-
map.put(LegacyRestTestBasePlugin.class, ":plugins:mapper-murmur3");
53-
map.put(LegacyRestTestBasePlugin.class, ":plugins:repository-hdfs");
5452
map.put(LegacyRestTestBasePlugin.class, ":plugins:store-smb");
5553
map.put(LegacyRestTestBasePlugin.class, ":qa:ccs-rolling-upgrade-remote-cluster");
5654
map.put(LegacyRestTestBasePlugin.class, ":qa:mixed-cluster");
@@ -74,11 +72,7 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
7472
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ent-search");
7573
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:fleet");
7674
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:logstash");
77-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:mapper-constant-keyword");
78-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:mapper-unsigned-long");
79-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:mapper-version");
8075
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:vector-tile");
81-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:wildcard");
8276
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:mixed-tier-cluster");
8377
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:repository-old-versions");
8478
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:rolling-upgrade");

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java

+9
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ public void apply(Project project) {
198198
task.getExtensions().getExtraProperties().set("usesDefaultDistribution", new Closure<Void>(task) {
199199
@Override
200200
public Void call(Object... args) {
201+
if (reasonForUsageProvided(args) == false) {
202+
throw new IllegalArgumentException(
203+
"Reason for using `usesDefaultDistribution` required.\nUse usesDefaultDistribution(\"reason why default distro is required here\")."
204+
);
205+
}
201206
task.dependsOn(defaultDistro);
202207
registerDistributionInputs(task, defaultDistro);
203208

@@ -212,6 +217,10 @@ public Void call(Object... args) {
212217

213218
return null;
214219
}
220+
221+
private static boolean reasonForUsageProvided(Object[] args) {
222+
return args.length == 1 && args[0] instanceof String && ((String) args[0]).isBlank() == false;
223+
}
215224
});
216225

217226
// Add `usesBwcDistribution(version)` extension method to test tasks to indicate they require a BWC distribution

build-tools-internal/version.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ netty = 4.1.118.Final
1818
commons_lang3 = 3.9
1919
google_oauth_client = 1.34.1
2020
awsv1sdk = 1.12.746
21-
awsv2sdk = 2.28.13
21+
awsv2sdk = 2.30.38
2222
reactive_streams = 1.0.4
2323

2424
antlr4 = 4.13.1

distribution/src/bin/elasticsearch-cli

+1
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

+1
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

+8-2
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

+8-2
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

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ final class SystemJvmOptions {
2626

2727
static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, String> sysprops) {
2828
String distroType = sysprops.get("es.distribution.type");
29+
String javaType = sysprops.get("es.java.type");
2930
boolean isHotspot = sysprops.getOrDefault("sun.management.compiler", "").contains("HotSpot");
3031
boolean entitlementsExplicitlyEnabled = Booleans.parseBoolean(sysprops.getOrDefault("es.entitlements.enabled", "true"));
3132
// java 24+ only supports entitlements, but it may be enabled on earlier versions explicitly
@@ -66,8 +67,11 @@ static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, St
6667
"-Dlog4j2.disable.jmx=true",
6768
"-Dlog4j2.formatMsgNoLookups=true",
6869
"-Djava.locale.providers=CLDR",
69-
// Pass through distribution type
70-
"-Des.distribution.type=" + distroType
70+
// Enable vectorization for whatever version we are running. This ensures we use vectorization even when running EA builds.
71+
"-Dorg.apache.lucene.vectorization.upperJavaFeatureVersion=" + Runtime.version().feature(),
72+
// Pass through distribution type and java type
73+
"-Des.distribution.type=" + distroType,
74+
"-Des.java.type=" + javaType
7175
),
7276
maybeEnableNativeAccess(useEntitlements),
7377
maybeOverrideDockerCgroup(distroType),

docs/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ testClusters.matching { it.name == "yamlRestTest"}.configureEach {
121121

122122
// TODO: remove this once cname is prepended to transport.publish_address by default in 8.0
123123
systemProperty 'es.transport.cname_in_publish_address', 'true'
124+
systemProperty 'es.queryable_built_in_roles_enabled', 'false'
124125

125126

126127
requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")

docs/changelog/122459.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122459
2+
summary: Double parameter markers for identifiers
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/122638.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pr: 122638
2+
summary: Expose `input_type` option at root level for `text_embedding` task type in
3+
Perform Inference API
4+
area: Machine Learning
5+
type: enhancement
6+
issues:
7+
- 117856

docs/changelog/122852.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122852
2+
summary: Run `TransportGetDataStreamsAction` on local node
3+
area: Data streams
4+
type: enhancement
5+
issues: []

docs/changelog/122921.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122921
2+
summary: Run `TransportGetMappingsAction` on local node
3+
area: Indices APIs
4+
type: enhancement
5+
issues: []

docs/changelog/123150.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 123150
2+
summary: Limit the number of chunks for semantic text to prevent high memory usage
3+
area: Machine Learning
4+
type: feature
5+
issues: []

docs/changelog/124177.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124177
2+
summary: "Improve error message for ( and ["
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 124145

docs/changelog/124313.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124313
2+
summary: Optimize memory usage in `ShardBulkInferenceActionFilter`
3+
area: Search
4+
type: enhancement
5+
issues: []

docs/changelog/124335.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124335
2+
summary: Change the order of the optimization rules
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/124477.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124477
2+
summary: Improve downsample performance by buffering docids and do bulk processing
3+
area: Downsampling
4+
type: enhancement
5+
issues: []

docs/changelog/124581.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124581
2+
summary: New `vector_rescore` parameter as a quantized index type option
3+
area: Vector Search
4+
type: enhancement
5+
issues: []

docs/changelog/124610.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124610
2+
summary: Remove page alignment in exchange sink
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/124651.yaml

+5
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/124676.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124676
2+
summary: TO_LOWER processes all values
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 124002

docs/changelog/124732.yaml

+6
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/124738.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124738
2+
summary: Upgrade AWS v2 SDK to 2.30.38
3+
area: Machine Learning
4+
type: upgrade
5+
issues: []

docs/changelog/124739.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124739
2+
summary: Improve rolling up metrics
3+
area: Downsampling
4+
type: enhancement
5+
issues: []

docs/changelog/124769.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pr: 124769
2+
summary: Migrate `model_version` to `model_id` when parsing persistent elser inference
3+
endpoints
4+
area: Machine Learning
5+
type: bug
6+
issues:
7+
- 124675

docs/changelog/124784.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 124784
2+
summary: Merge template mappings properly during validation
3+
area: Mapping
4+
type: bug
5+
issues:
6+
- 123372

0 commit comments

Comments
 (0)