Skip to content

Commit b291aef

Browse files
authored
Merge branch 'main' into dls-stats-ordering
2 parents 0d0cbf8 + b7dbb26 commit b291aef

File tree

77 files changed

+1475
-398
lines changed

Some content is hidden

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

77 files changed

+1475
-398
lines changed

docs/changelog/135370.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135370
2+
summary: Add new `pattern_text` field mapper in tech preview
3+
area: Mapping
4+
type: feature
5+
issues: []

docs/reference/query-languages/esql/_snippets/commands/layout/inlinestats-by.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ by the values of another column.
7676

7777
:::{note}
7878
The `languages` column moves to the last position in the output table because it is
79-
a column overriden by the `INLINE STATS` command (it's the grouping key) and it is the last column defined by it.
79+
a column overridden by the `INLINE STATS` command (it's the grouping key) and it is the last column defined by it.
8080
:::
8181

8282
:::{include} ../examples/inlinestats.csv-spec/max-salary.md

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ tests:
7373
- class: org.elasticsearch.xpack.apmdata.APMYamlTestSuiteIT
7474
method: test {yaml=/10_apm/Test template reinstallation}
7575
issue: https://github.com/elastic/elasticsearch/issues/116445
76-
- class: org.elasticsearch.versioning.ConcurrentSeqNoVersioningIT
77-
method: testSeqNoCASLinearizability
78-
issue: https://github.com/elastic/elasticsearch/issues/117249
7976
- class: org.elasticsearch.xpack.inference.InferenceRestIT
8077
method: test {p0=inference/40_semantic_text_query/Query a field that uses the default ELSER 2 endpoint}
8178
issue: https://github.com/elastic/elasticsearch/issues/117027

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static TransportVersion def(int id) {
192192
public static final TransportVersion ML_INFERENCE_ELASTIC_RERANK_ADDED_8_19 = def(8_841_0_48);
193193
public static final TransportVersion NONE_CHUNKING_STRATEGY_8_19 = def(8_841_0_49);
194194
public static final TransportVersion IDP_CUSTOM_SAML_ATTRIBUTES_ALLOW_LIST_8_19 = def(8_841_0_50);
195-
public static final TransportVersion SETTINGS_IN_DATA_STREAMS_8_19 = def(8_841_0_51);
196195
public static final TransportVersion INITIAL_ELASTICSEARCH_9_0 = def(9_000_0_00);
197196
public static final TransportVersion REMOVE_SNAPSHOT_FAILURES_90 = def(9_000_0_01);
198197
public static final TransportVersion TRANSPORT_STATS_HANDLING_TIME_REQUIRED_90 = def(9_000_0_02);
@@ -263,7 +262,6 @@ static TransportVersion def(int id) {
263262
public static final TransportVersion SYNONYMS_REFRESH_PARAM = def(9_060_0_00);
264263
public static final TransportVersion DOC_FIELDS_AS_LIST = def(9_061_0_00);
265264
public static final TransportVersion DENSE_VECTOR_OFF_HEAP_STATS = def(9_062_00_0);
266-
public static final TransportVersion SETTINGS_IN_DATA_STREAMS = def(9_064_0_00);
267265
public static final TransportVersion INTRODUCE_FAILURES_LIFECYCLE = def(9_065_0_00);
268266
public static final TransportVersion PROJECT_METADATA_SETTINGS = def(9_066_0_00);
269267
public static final TransportVersion AGGREGATE_METRIC_DOUBLE_BLOCK = def(9_067_0_00);
@@ -280,7 +278,6 @@ static TransportVersion def(int id) {
280278
public static final TransportVersion ML_INFERENCE_HUGGING_FACE_CHAT_COMPLETION_ADDED = def(9_078_0_00);
281279
public static final TransportVersion NODES_STATS_SUPPORTS_MULTI_PROJECT = def(9_079_0_00);
282280
public static final TransportVersion ML_INFERENCE_HUGGING_FACE_RERANK_ADDED = def(9_080_0_00);
283-
public static final TransportVersion SETTINGS_IN_DATA_STREAMS_DRY_RUN = def(9_081_0_00);
284281
public static final TransportVersion ML_INFERENCE_SAGEMAKER_CHAT_COMPLETION = def(9_082_0_00);
285282
public static final TransportVersion ML_INFERENCE_VERTEXAI_CHATCOMPLETION_ADDED = def(9_083_0_00);
286283
public static final TransportVersion INFERENCE_CUSTOM_SERVICE_ADDED = def(9_084_0_00);

server/src/main/java/org/elasticsearch/action/datastreams/UpdateDataStreamSettingsAction.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.elasticsearch.action.datastreams;
1111

1212
import org.elasticsearch.TransportVersion;
13-
import org.elasticsearch.TransportVersions;
1413
import org.elasticsearch.action.ActionResponse;
1514
import org.elasticsearch.action.ActionType;
1615
import org.elasticsearch.action.IndicesRequest;
@@ -42,6 +41,7 @@ public class UpdateDataStreamSettingsAction extends ActionType<UpdateDataStreamS
4241
public static final String NAME = "indices:admin/data_stream/settings/update";
4342
public static final UpdateDataStreamSettingsAction INSTANCE = new UpdateDataStreamSettingsAction();
4443

44+
private static final TransportVersion SETTINGS_IN_DATA_STREAMS = TransportVersion.fromName("settings_in_data_streams");
4545
private static final TransportVersion DATA_STREAM_WRITE_INDEX_ONLY_SETTINGS = TransportVersion.fromName(
4646
"data_stream_write_index_only_settings"
4747
);
@@ -88,8 +88,7 @@ public Request(StreamInput in) throws IOException {
8888
super(in);
8989
this.dataStreamNames = in.readStringArray();
9090
this.settings = Settings.readSettingsFromStream(in);
91-
if (in.getTransportVersion().onOrAfter(TransportVersions.SETTINGS_IN_DATA_STREAMS_DRY_RUN)
92-
|| in.getTransportVersion().isPatchFrom(TransportVersions.SETTINGS_IN_DATA_STREAMS_8_19)) {
91+
if (in.getTransportVersion().supports(SETTINGS_IN_DATA_STREAMS)) {
9392
this.dryRun = in.readBoolean();
9493
} else {
9594
this.dryRun = false;
@@ -101,8 +100,7 @@ public void writeTo(StreamOutput out) throws IOException {
101100
super.writeTo(out);
102101
out.writeStringArray(dataStreamNames);
103102
settings.writeTo(out);
104-
if (out.getTransportVersion().onOrAfter(TransportVersions.SETTINGS_IN_DATA_STREAMS_DRY_RUN)
105-
|| out.getTransportVersion().isPatchFrom(TransportVersions.SETTINGS_IN_DATA_STREAMS_8_19)) {
103+
if (out.getTransportVersion().supports(SETTINGS_IN_DATA_STREAMS)) {
106104
out.writeBoolean(dryRun);
107105
}
108106
}

server/src/main/java/org/elasticsearch/cluster/NotMasterException.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@
99
package org.elasticsearch.cluster;
1010

1111
import org.elasticsearch.ElasticsearchException;
12+
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
13+
import org.elasticsearch.cluster.coordination.FailedToCommitClusterStateException;
1214
import org.elasticsearch.common.io.stream.StreamInput;
1315

1416
import java.io.IOException;
1517

1618
/**
17-
* Exception which indicates that an operation failed because the node stopped being the elected master.
19+
* Exception indicating that a cluster state update operation failed because the node stopped being the elected master.
20+
* Since this exception is thrown prior to the cluster state publication, it should only be used when the cluster state update
21+
* <i>definitely</i> did not happen, and there is no possibility the next master committed the cluster state update.
22+
*
23+
* This is different from {@link FailedToCommitClusterStateException}.
24+
*
25+
* This exception is retryable within {@link TransportMasterNodeAction}.
1826
*/
1927
public class NotMasterException extends ElasticsearchException {
2028

server/src/main/java/org/elasticsearch/cluster/coordination/FailedToCommitClusterStateException.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@
99
package org.elasticsearch.cluster.coordination;
1010

1111
import org.elasticsearch.ElasticsearchException;
12+
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
13+
import org.elasticsearch.cluster.NotMasterException;
1214
import org.elasticsearch.common.io.stream.StreamInput;
1315

1416
import java.io.IOException;
1517

1618
/**
1719
* Thrown when a cluster state publication fails to commit the new cluster state. If publication fails then a new master is elected but the
18-
* update might or might not take effect, depending on whether or not the newly-elected master accepted the published state that failed to
19-
* be committed.
20+
* update might or might not take effect, depending on whether the newly-elected master accepted the published state that failed to
21+
* be committed. This exception should only be used when there is <i>ambiguity</i> whether a state update took effect or not.
22+
*
23+
* This is different from {@link NotMasterException} where we know for certain that a state update never took effect.
24+
*
25+
* This exception is retryable within {@link TransportMasterNodeAction}.
2026
*
2127
* See {@link ClusterStatePublisher} for more details.
2228
*/

server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public final class DataStream implements SimpleDiffable<DataStream>, ToXContentO
8686

8787
private static final Logger LOGGER = LogManager.getLogger(DataStream.class);
8888

89+
private static final TransportVersion SETTINGS_IN_DATA_STREAMS = TransportVersion.fromName("settings_in_data_streams");
8990
private static final TransportVersion MAPPINGS_IN_DATA_STREAMS = TransportVersion.fromName("mappings_in_data_streams");
9091

9192
public static final NodeFeature DATA_STREAM_FAILURE_STORE_FEATURE = new NodeFeature("data_stream.failure_store");
@@ -334,8 +335,7 @@ public static DataStream read(StreamInput in) throws IOException {
334335
dataStreamOptions = failureStoreEnabled ? DataStreamOptions.FAILURE_STORE_ENABLED : null;
335336
}
336337
final Settings settings;
337-
if (in.getTransportVersion().onOrAfter(TransportVersions.SETTINGS_IN_DATA_STREAMS)
338-
|| in.getTransportVersion().isPatchFrom(TransportVersions.SETTINGS_IN_DATA_STREAMS_8_19)) {
338+
if (in.getTransportVersion().supports(SETTINGS_IN_DATA_STREAMS)) {
339339
settings = Settings.readSettingsFromStream(in);
340340
} else {
341341
settings = Settings.EMPTY;
@@ -1479,8 +1479,7 @@ public void writeTo(StreamOutput out) throws IOException {
14791479
if (out.getTransportVersion().onOrAfter(DataStream.ADD_DATA_STREAM_OPTIONS_VERSION)) {
14801480
out.writeOptionalWriteable(dataStreamOptions.isEmpty() ? null : dataStreamOptions);
14811481
}
1482-
if (out.getTransportVersion().onOrAfter(TransportVersions.SETTINGS_IN_DATA_STREAMS)
1483-
|| out.getTransportVersion().isPatchFrom(TransportVersions.SETTINGS_IN_DATA_STREAMS_8_19)) {
1482+
if (out.getTransportVersion().supports(SETTINGS_IN_DATA_STREAMS)) {
14841483
settings.writeTo(out);
14851484
}
14861485
if (out.getTransportVersion().supports(MAPPINGS_IN_DATA_STREAMS)) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9064000,8841051
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9081000

0 commit comments

Comments
 (0)