Skip to content

Commit f713035

Browse files
committed
Merge branch 'main' into 2025/09/09/cluster-applier-thread-watchdog
2 parents 116c063 + f081e45 commit f713035

File tree

39 files changed

+2338
-2196
lines changed

39 files changed

+2338
-2196
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ public static TransportVersionDefinition fromString(Path file, String contents,
2222

2323
String idsLine = null;
2424
if (contents.isEmpty() == false) {
25-
String[] lines = contents.split(System.lineSeparator());
25+
// Regardless of whether windows newlines exist (they could be added by git), we split on line feed.
26+
// All we care about skipping lines with the comment character, so the remaining \r won't matter
27+
String[] lines = contents.split("\n");
2628
for (String line : lines) {
27-
line = line.replaceAll("\\s+", "");
29+
line = line.strip();
2830
if (line.startsWith("#") == false) {
2931
idsLine = line;
3032
break;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ public static TransportVersionUpperBound fromString(Path file, String contents)
2424
String branch = filename.substring(slashIndex == -1 ? 0 : (slashIndex + 1), filename.length() - 4);
2525

2626
String idsLine = null;
27-
String[] lines = contents.split(System.lineSeparator());
27+
// Regardless of whether windows newlines exist (they could be added by git), we split on line feed.
28+
// All we care about skipping lines with the comment character, so the remaining \r won't matter
29+
String[] lines = contents.split("\n");
2830
for (String line : lines) {
29-
line = line.replaceAll("\\s+", "");
31+
line = line.strip();
3032
if (line.startsWith("#") == false) {
3133
idsLine = line;
3234
break;

docs/changelog/135897.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135897
2+
summary: Apply source excludes early when retrieving the `_inference_fields`
3+
area: Search
4+
type: bug
5+
issues: []

docs/changelog/135901.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135901
2+
summary: Add support for dot-separated attribute names (e.g. `foo.bar`) and for parameters (e.g. `??my_param`) in FUSE GROUP BY
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/reference/elasticsearch/index-lifecycle-actions/ilm-downsample.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mapped_pages:
77

88
Phases allowed: hot, warm, cold.
99

10-
Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval. For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index. All documents within an hour interval are summarized and stored as a single document and stored in the downsample index.
10+
Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (`min`, `max`, `sum`, and `value_count`) for each metric field grouped by a configured time interval. For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index. All documents within an hour interval are summarized and stored as a single document and stored in the downsample index.
1111

1212
This action corresponds to the [downsample API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample).
1313

modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/RestSearchTemplateAction.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import java.io.IOException;
2525
import java.util.List;
26+
import java.util.Optional;
2627
import java.util.Set;
2728
import java.util.function.Predicate;
2829

@@ -38,10 +39,12 @@ public class RestSearchTemplateAction extends BaseRestHandler {
3839

3940
private final Predicate<NodeFeature> clusterSupportsFeature;
4041
private final Settings settings;
42+
private final boolean inCpsContext;
4143

4244
public RestSearchTemplateAction(Predicate<NodeFeature> clusterSupportsFeature, Settings settings) {
4345
this.clusterSupportsFeature = clusterSupportsFeature;
4446
this.settings = settings;
47+
this.inCpsContext = settings != null && settings.getAsBoolean("serverless.cross_project.enabled", false);
4548
}
4649

4750
@Override
@@ -61,7 +64,7 @@ public String getName() {
6164

6265
@Override
6366
public RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {
64-
if (settings != null && settings.getAsBoolean("serverless.cross_project.enabled", false)) {
67+
if (inCpsContext) {
6568
// accept but drop project_routing param until fully supported
6669
request.param("project_routing");
6770
}
@@ -73,7 +76,9 @@ public RestChannelConsumer prepareRequest(RestRequest request, NodeClient client
7376
request,
7477
null,
7578
clusterSupportsFeature,
76-
size -> searchRequest.source().size(size)
79+
size -> searchRequest.source().size(size),
80+
// This endpoint is CPS-enabled so propagate the right value.
81+
Optional.of(inCpsContext)
7782
);
7883

7984
// Creates the search template request

modules/reindex/src/main/java/org/elasticsearch/reindex/AbstractBulkByQueryRestHandler.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import java.io.IOException;
2828
import java.util.Map;
29+
import java.util.Optional;
2930
import java.util.function.Consumer;
3031
import java.util.function.Predicate;
3132

@@ -52,7 +53,14 @@ protected void parseInternalRequest(
5253
SearchRequest searchRequest = internal.getSearchRequest();
5354

5455
try (XContentParser parser = extractRequestSpecificFields(restRequest, bodyConsumers)) {
55-
RestSearchAction.parseSearchRequest(searchRequest, restRequest, parser, clusterSupportsFeature, size -> failOnSizeSpecified());
56+
RestSearchAction.parseSearchRequest(
57+
searchRequest,
58+
restRequest,
59+
parser,
60+
clusterSupportsFeature,
61+
size -> failOnSizeSpecified(),
62+
Optional.empty()
63+
);
5664
}
5765

5866
searchRequest.source().size(restRequest.paramAsInt("scroll_size", searchRequest.source().size()));

muted-tests.yml

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,6 @@ tests:
504504
- class: org.elasticsearch.repositories.blobstore.testkit.analyze.MinioRepositoryAnalysisRestIT
505505
method: testRepositoryAnalysis
506506
issue: https://github.com/elastic/elasticsearch/issues/134853
507-
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
508-
method: testStopQueryInlinestats
509-
issue: https://github.com/elastic/elasticsearch/issues/134854
510507
- class: org.elasticsearch.xpack.esql.action.CrossClusterCancellationIT
511508
method: testCancelSkipUnavailable
512509
issue: https://github.com/elastic/elasticsearch/issues/134865
@@ -522,9 +519,6 @@ tests:
522519
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
523520
method: test {csv-spec:stats.CountDistinctWithConditions}
524521
issue: https://github.com/elastic/elasticsearch/issues/134993
525-
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
526-
method: testStopQueryInlineStats
527-
issue: https://github.com/elastic/elasticsearch/issues/135032
528522
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
529523
method: test {csv-spec:fork.ForkBeforeStatsWithWhere}
530524
issue: https://github.com/elastic/elasticsearch/issues/135041
@@ -660,6 +654,75 @@ tests:
660654
- class: org.elasticsearch.upgrades.FullClusterRestartIT
661655
method: testPersianAnalyzerBWC {cluster=UPGRADED}
662656
issue: https://github.com/elastic/elasticsearch/issues/135930
657+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
658+
method: testSnapshotRestore {cluster=UPGRADED}
659+
issue: https://github.com/elastic/elasticsearch/issues/135933
660+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
661+
method: testForbidDisableSoftDeletesOnRestore {cluster=UPGRADED}
662+
issue: https://github.com/elastic/elasticsearch/issues/135937
663+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
664+
method: testShrinkAfterUpgrade {cluster=UPGRADED}
665+
issue: https://github.com/elastic/elasticsearch/issues/135938
666+
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
667+
method: testTopNPushedToLuceneOnSortedIndex
668+
issue: https://github.com/elastic/elasticsearch/issues/135939
669+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
670+
method: testClosedIndices {cluster=UPGRADED}
671+
issue: https://github.com/elastic/elasticsearch/issues/135941
672+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
673+
method: testOperationBasedRecovery {cluster=UPGRADED}
674+
issue: https://github.com/elastic/elasticsearch/issues/135944
675+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
676+
method: testRomanianAnalyzerBWC {cluster=UPGRADED}
677+
issue: https://github.com/elastic/elasticsearch/issues/135948
678+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
679+
method: testEmptyShard {cluster=UPGRADED}
680+
issue: https://github.com/elastic/elasticsearch/issues/135951
681+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
682+
method: testRollover {cluster=UPGRADED}
683+
issue: https://github.com/elastic/elasticsearch/issues/135952
684+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
685+
method: testRecovery {cluster=UPGRADED}
686+
issue: https://github.com/elastic/elasticsearch/issues/135953
687+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
688+
method: testNewReplicas {cluster=UPGRADED}
689+
issue: https://github.com/elastic/elasticsearch/issues/135956
690+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
691+
method: testHistoryUUIDIsAdded {cluster=UPGRADED}
692+
issue: https://github.com/elastic/elasticsearch/issues/135957
693+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
694+
method: testTurnOffTranslogRetentionAfterUpgraded {cluster=UPGRADED}
695+
issue: https://github.com/elastic/elasticsearch/issues/135958
696+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
697+
method: testSoftDeletes {cluster=UPGRADED}
698+
issue: https://github.com/elastic/elasticsearch/issues/135959
699+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
700+
method: testClusterState {cluster=UPGRADED}
701+
issue: https://github.com/elastic/elasticsearch/issues/135960
702+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
703+
method: testShrink {cluster=UPGRADED}
704+
issue: https://github.com/elastic/elasticsearch/issues/135962
705+
- class: org.elasticsearch.upgrades.FullClusterRestartIT
706+
method: testSearchTimeSeriesMode {cluster=UPGRADED}
707+
issue: https://github.com/elastic/elasticsearch/issues/135963
708+
- class: org.elasticsearch.datastreams.DataStreamIndexSettingsProviderTests
709+
method: testGetAdditionalIndexSettings
710+
issue: https://github.com/elastic/elasticsearch/issues/135972
711+
- class: org.elasticsearch.test.rest.ClientYamlTestSuiteIT
712+
method: test {yaml=indices.get_sample/10_basic/Test get sample for index with no sample config}
713+
issue: https://github.com/elastic/elasticsearch/issues/135975
714+
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
715+
method: testStopQueryInlineStats
716+
issue: https://github.com/elastic/elasticsearch/issues/135032
717+
- class: org.elasticsearch.xpack.esql.plan.logical.local.ImmediateLocalSupplierTests
718+
method: testEqualsAndHashcode
719+
issue: https://github.com/elastic/elasticsearch/issues/135977
720+
- class: org.elasticsearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT
721+
method: test {yaml=indices.get_sample/10_basic/Test get sample for index with no sample config}
722+
issue: https://github.com/elastic/elasticsearch/issues/135989
723+
- class: org.elasticsearch.compute.data.BasicPageTests
724+
method: testEqualityAndHashCode
725+
issue: https://github.com/elastic/elasticsearch/issues/135990
663726

664727
# Examples:
665728
#

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ static TransportVersion def(int id) {
5353
}
5454

5555
// TODO: ES-10337 we can remove all transport versions earlier than 8.18
56-
public static final TransportVersion V_7_0_0 = def(7_00_00_99);
5756
public static final TransportVersion V_7_1_0 = def(7_01_00_99);
5857
public static final TransportVersion V_7_2_0 = def(7_02_00_99);
5958
public static final TransportVersion V_7_3_0 = def(7_03_00_99);

server/src/main/java/org/elasticsearch/index/get/ShardGetService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,14 @@ private static Boolean shouldExcludeVectorsFromSourceExplicit(FetchSourceContext
426426

427427
public static boolean shouldExcludeInferenceFieldsFromSource(IndexSettings indexSettings, FetchSourceContext fetchSourceContext) {
428428
var explicit = shouldExcludeInferenceFieldsFromSourceExplicit(fetchSourceContext);
429+
var filter = fetchSourceContext != null ? fetchSourceContext.filter() : null;
430+
if (filter != null) {
431+
if (filter.isPathFiltered(InferenceMetadataFieldsMapper.NAME, true)) {
432+
return true;
433+
} else if (filter.isExplicitlyIncluded(InferenceMetadataFieldsMapper.NAME)) {
434+
return false;
435+
}
436+
}
429437
return explicit != null ? explicit : INDEX_MAPPING_EXCLUDE_SOURCE_VECTORS_SETTING.get(indexSettings.getSettings());
430438
}
431439

0 commit comments

Comments
 (0)