Skip to content

Commit bd96e05

Browse files
Merge branch 'main' into pkar/msearch-mrt-fix
2 parents cf6d24f + 410e573 commit bd96e05

File tree

62 files changed

+301
-617
lines changed

Some content is hidden

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

62 files changed

+301
-617
lines changed

muted-tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,15 @@ tests:
478478
- class: org.elasticsearch.xpack.inference.integration.AuthorizationTaskExecutorIT
479479
method: testCreatesEisChatCompletionEndpoint
480480
issue: https://github.com/elastic/elasticsearch/issues/138764
481+
- class: org.elasticsearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT
482+
method: test {yaml=index/100_field_name_length_limit/Test field name length limit array synthetic source}
483+
issue: https://github.com/elastic/elasticsearch/issues/139300
484+
- class: org.elasticsearch.xpack.esql.qa.single_node.RestEsqlIT
485+
method: testProfile {SYNC}
486+
issue: https://github.com/elastic/elasticsearch/issues/139303
487+
- class: org.elasticsearch.xpack.esql.qa.single_node.RestEsqlIT
488+
method: testProfile {ASYNC}
489+
issue: https://github.com/elastic/elasticsearch/issues/139304
481490

482491
# Examples:
483492
#

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

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -216,21 +216,9 @@ public static Build readBuild(StreamInput in) throws IOException {
216216
final String minWireVersion;
217217
final String minIndexVersion;
218218
final String displayString;
219-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
220-
version = in.readString();
221-
qualifier = in.readOptionalString();
222-
snapshot = in.readBoolean();
223-
} else {
224-
snapshot = in.readBoolean();
225-
String rawVersion = in.readString();
226-
// need to separate out qualifiers from older nodes
227-
var versionMatcher = qualfiedVersionRegex.matcher(rawVersion);
228-
if (versionMatcher.matches() == false) {
229-
throw new IllegalStateException(String.format(Locale.ROOT, "Malformed elasticsearch compile version: %s", rawVersion));
230-
}
231-
version = versionMatcher.group(1);
232-
qualifier = versionMatcher.group(2);
233-
}
219+
version = in.readString();
220+
qualifier = in.readOptionalString();
221+
snapshot = in.readBoolean();
234222
minWireVersion = in.readString();
235223
minIndexVersion = in.readString();
236224
displayString = in.readString();
@@ -242,14 +230,9 @@ public static void writeBuild(Build build, StreamOutput out) throws IOException
242230
out.writeString(build.type().displayName());
243231
out.writeString(build.hash());
244232
out.writeString(build.date());
245-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
246-
out.writeString(build.version());
247-
out.writeOptionalString(build.qualifier());
248-
out.writeBoolean(build.isSnapshot());
249-
} else {
250-
out.writeBoolean(build.isSnapshot());
251-
out.writeString(build.qualifiedVersion());
252-
}
233+
out.writeString(build.version());
234+
out.writeOptionalString(build.qualifier());
235+
out.writeBoolean(build.isSnapshot());
253236
out.writeString(build.minWireCompatVersion());
254237
out.writeString(build.minIndexCompatVersion());
255238
out.writeString(build.displayString());

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ static TransportVersion def(int id) {
5757
* READ THE COMMENT BELOW THIS BLOCK OF DECLARATIONS BEFORE ADDING NEW TRANSPORT VERSIONS
5858
* Detached transport versions added below here.
5959
*/
60-
public static final TransportVersion V_8_12_0 = def(8_560_0_00);
61-
public static final TransportVersion V_8_12_1 = def(8_560_0_01);
6260
public static final TransportVersion V_8_13_0 = def(8_595_0_00);
6361
public static final TransportVersion V_8_13_4 = def(8_595_0_01);
6462
public static final TransportVersion V_8_14_0 = def(8_636_0_01);

server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
import org.elasticsearch.Build;
1313
import org.elasticsearch.TransportVersion;
14-
import org.elasticsearch.TransportVersions;
15-
import org.elasticsearch.Version;
1614
import org.elasticsearch.action.support.nodes.BaseNodeResponse;
1715
import org.elasticsearch.cluster.node.DiscoveryNode;
1816
import org.elasticsearch.cluster.version.CompatibilityVersions;
@@ -64,16 +62,9 @@ public class NodeInfo extends BaseNodeResponse {
6462

6563
public NodeInfo(StreamInput in) throws IOException {
6664
super(in);
67-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
68-
version = in.readString();
69-
compatibilityVersions = CompatibilityVersions.readVersion(in);
70-
indexVersion = IndexVersion.readVersion(in);
71-
} else {
72-
Version legacyVersion = Version.readVersion(in);
73-
version = legacyVersion.toString();
74-
compatibilityVersions = new CompatibilityVersions(TransportVersion.readVersion(in), Map.of()); // unknown mappings versions;
75-
indexVersion = IndexVersion.readVersion(in);
76-
}
65+
version = in.readString();
66+
compatibilityVersions = CompatibilityVersions.readVersion(in);
67+
indexVersion = IndexVersion.readVersion(in);
7768
componentVersions = in.readImmutableMap(StreamInput::readString, StreamInput::readVInt);
7869
build = Build.readBuild(in);
7970
if (in.readBoolean()) {
@@ -228,11 +219,7 @@ private <T extends ReportingService.Info> void addInfoIfNonNull(Class<T> clazz,
228219
@Override
229220
public void writeTo(StreamOutput out) throws IOException {
230221
super.writeTo(out);
231-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
232-
out.writeString(version);
233-
} else {
234-
Version.writeVersion(Version.fromString(version), out);
235-
}
222+
out.writeString(version);
236223
compatibilityVersions.writeTo(out);
237224
IndexVersion.writeVersion(indexVersion, out);
238225
out.writeMap(componentVersions, StreamOutput::writeString, StreamOutput::writeVInt);

server/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestParameters.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,14 @@ public NodesStatsRequestParameters() {
3939
public NodesStatsRequestParameters(StreamInput in) throws IOException {
4040
indices = new CommonStatsFlags(in);
4141
requestedMetrics = Metric.readSetFrom(in);
42-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
43-
includeShardsStats = in.readBoolean();
44-
} else {
45-
includeShardsStats = true;
46-
}
42+
includeShardsStats = in.readBoolean();
4743
}
4844

4945
@Override
5046
public void writeTo(StreamOutput out) throws IOException {
5147
indices.writeTo(out);
5248
Metric.writeSetTo(out, requestedMetrics);
53-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
54-
out.writeBoolean(includeShardsStats);
55-
}
49+
out.writeBoolean(includeShardsStats);
5650
}
5751

5852
public CommonStatsFlags indices() {

server/src/main/java/org/elasticsearch/action/admin/cluster/stats/SearchUsageStats.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.util.Map;
2424
import java.util.Objects;
2525

26-
import static org.elasticsearch.TransportVersions.V_8_12_0;
2726
import static org.elasticsearch.TransportVersions.V_8_16_0;
2827

2928
/**
@@ -78,7 +77,7 @@ public SearchUsageStats(StreamInput in) throws IOException {
7877
this.queries = in.readMap(StreamInput::readLong);
7978
this.sections = in.readMap(StreamInput::readLong);
8079
this.totalSearchCount = in.readVLong();
81-
this.rescorers = in.getTransportVersion().onOrAfter(V_8_12_0) ? in.readMap(StreamInput::readLong) : Map.of();
80+
this.rescorers = in.readMap(StreamInput::readLong);
8281
this.retrievers = in.getTransportVersion().onOrAfter(V_8_16_0) ? in.readMap(StreamInput::readLong) : Map.of();
8382
this.extendedSearchUsageStats = in.getTransportVersion().supports(EXTENDED_SEARCH_USAGE_TELEMETRY)
8483
? new ExtendedSearchUsageStats(in)
@@ -91,9 +90,7 @@ public void writeTo(StreamOutput out) throws IOException {
9190
out.writeMap(sections, StreamOutput::writeLong);
9291
out.writeVLong(totalSearchCount);
9392

94-
if (out.getTransportVersion().onOrAfter(V_8_12_0)) {
95-
out.writeMap(rescorers, StreamOutput::writeLong);
96-
}
93+
out.writeMap(rescorers, StreamOutput::writeLong);
9794
if (out.getTransportVersion().onOrAfter(V_8_16_0)) {
9895
out.writeMap(retrievers, StreamOutput::writeLong);
9996
}

server/src/main/java/org/elasticsearch/action/admin/indices/refresh/UnpromotableShardRefreshRequest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
package org.elasticsearch.action.admin.indices.refresh;
1111

12-
import org.elasticsearch.TransportVersions;
1312
import org.elasticsearch.action.ActionRequestValidationException;
1413
import org.elasticsearch.action.support.broadcast.unpromotable.BroadcastUnpromotableRequest;
1514
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
@@ -55,7 +54,7 @@ public UnpromotableShardRefreshRequest(
5554
public UnpromotableShardRefreshRequest(StreamInput in) throws IOException {
5655
super(in);
5756
segmentGeneration = in.readVLong();
58-
primaryTerm = in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0) ? in.readVLong() : Engine.UNKNOWN_PRIMARY_TERM;
57+
primaryTerm = in.readVLong();
5958
// The timeout is only used by the request sender, therefore we don't write it over the wire
6059
timeout = null;
6160
}
@@ -75,9 +74,7 @@ public ActionRequestValidationException validate() {
7574
public void writeTo(StreamOutput out) throws IOException {
7675
super.writeTo(out);
7776
out.writeVLong(segmentGeneration);
78-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
79-
out.writeVLong(primaryTerm);
80-
}
77+
out.writeVLong(primaryTerm);
8178
}
8279

8380
public long getSegmentGeneration() {

server/src/main/java/org/elasticsearch/action/admin/indices/settings/put/UpdateSettingsRequest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package org.elasticsearch.action.admin.indices.settings.put;
1111

1212
import org.elasticsearch.ElasticsearchParseException;
13-
import org.elasticsearch.TransportVersions;
1413
import org.elasticsearch.action.ActionRequestValidationException;
1514
import org.elasticsearch.action.IndicesRequest;
1615
import org.elasticsearch.action.support.IndicesOptions;
@@ -57,9 +56,7 @@ public UpdateSettingsRequest(StreamInput in) throws IOException {
5756
settings = readSettingsFromStream(in);
5857
preserveExisting = in.readBoolean();
5958
origin = in.readString();
60-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
61-
reopen = in.readBoolean();
62-
}
59+
reopen = in.readBoolean();
6360
}
6461

6562
public UpdateSettingsRequest() {
@@ -204,9 +201,7 @@ public void writeTo(StreamOutput out) throws IOException {
204201
settings.writeTo(out);
205202
out.writeBoolean(preserveExisting);
206203
out.writeString(origin);
207-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
208-
out.writeBoolean(reopen);
209-
}
204+
out.writeBoolean(reopen);
210205
}
211206

212207
@Override

server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycle.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import java.util.Objects;
2727
import java.util.function.Supplier;
2828

29-
import static org.elasticsearch.TransportVersions.V_8_12_0;
30-
3129
/**
3230
* Encapsulates the information that describes an index from its data stream lifecycle perspective.
3331
*/
@@ -92,12 +90,7 @@ public ExplainIndexDataStreamLifecycle(StreamInput in) throws IOException {
9290
this.rolloverDate = in.readOptionalLong();
9391
this.generationDateMillis = in.readOptionalLong();
9492
this.lifecycle = in.readOptionalWriteable(DataStreamLifecycle::new);
95-
if (in.getTransportVersion().onOrAfter(V_8_12_0)) {
96-
this.error = in.readOptionalWriteable(ErrorEntry::new);
97-
} else {
98-
String bwcErrorMessage = in.readOptionalString();
99-
this.error = new ErrorEntry(-1L, bwcErrorMessage, -1L, -1);
100-
}
93+
this.error = in.readOptionalWriteable(ErrorEntry::new);
10194
} else {
10295
this.indexCreationDate = null;
10396
this.rolloverDate = null;
@@ -173,12 +166,7 @@ public void writeTo(StreamOutput out) throws IOException {
173166
out.writeOptionalLong(rolloverDate);
174167
out.writeOptionalLong(generationDateMillis);
175168
out.writeOptionalWriteable(lifecycle);
176-
if (out.getTransportVersion().onOrAfter(V_8_12_0)) {
177-
out.writeOptionalWriteable(error);
178-
} else {
179-
String errorMessage = error != null ? error.error() : null;
180-
out.writeOptionalString(errorMessage);
181-
}
169+
out.writeOptionalWriteable(error);
182170
}
183171
}
184172

server/src/main/java/org/elasticsearch/action/get/TransportGetFromTranslogAction.java

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

1212
import org.apache.lucene.util.BytesRef;
13-
import org.elasticsearch.TransportVersions;
1413
import org.elasticsearch.action.ActionListener;
1514
import org.elasticsearch.action.ActionRequestValidationException;
1615
import org.elasticsearch.action.ActionResponse;
@@ -24,7 +23,6 @@
2423
import org.elasticsearch.common.io.stream.StreamOutput;
2524
import org.elasticsearch.core.Nullable;
2625
import org.elasticsearch.index.IndexService;
27-
import org.elasticsearch.index.engine.Engine;
2826
import org.elasticsearch.index.engine.InternalEngine;
2927
import org.elasticsearch.index.get.GetResult;
3028
import org.elasticsearch.index.shard.IndexShard;
@@ -152,16 +150,14 @@ public Response(GetResult getResult, long primaryTerm, long segmentGeneration) {
152150
public Response(StreamInput in) throws IOException {
153151
segmentGeneration = in.readZLong();
154152
getResult = in.readOptionalWriteable(GetResult::new);
155-
primaryTerm = in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0) ? in.readVLong() : Engine.UNKNOWN_PRIMARY_TERM;
153+
primaryTerm = in.readVLong();
156154
}
157155

158156
@Override
159157
public void writeTo(StreamOutput out) throws IOException {
160158
out.writeZLong(segmentGeneration);
161159
out.writeOptionalWriteable(getResult);
162-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
163-
out.writeVLong(primaryTerm);
164-
}
160+
out.writeVLong(primaryTerm);
165161
}
166162

167163
@Nullable

0 commit comments

Comments
 (0)