From 24ed4ca43f7926e352f1020b63ff0624f3dd2ef3 Mon Sep 17 00:00:00 2001 From: Simon Cooper Date: Thu, 5 Oct 2023 11:41:11 +0100 Subject: [PATCH] Collapse transport versions 8,500,021-8,500,039 to 8,500,040 (#100075) --- .../main/java/org/elasticsearch/Build.java | 4 ++-- .../org/elasticsearch/TransportVersions.java | 19 ------------------- .../analyze/ReloadAnalyzersRequest.java | 5 ++--- .../cluster/metadata/DataStreamLifecycle.java | 4 ++-- .../cluster/node/DiscoveryNode.java | 4 ++-- .../index/query/MatchNoneQueryBuilder.java | 4 ++-- .../index/query/SimpleQueryStringBuilder.java | 2 +- .../downsample/DownsampleIndexerAction.java | 4 ++-- .../downsample/DownsampleShardStatus.java | 4 ++-- .../search/action/AsyncStatusResponse.java | 4 ++-- .../action/user/AuthenticateResponse.java | 2 +- .../application/rules/RuleQueryBuilder.java | 2 +- .../xpack/eql/action/EqlSearchResponse.java | 4 ++-- .../eql/action/EqlSearchResponseTests.java | 2 +- 14 files changed, 22 insertions(+), 42 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/Build.java b/server/src/main/java/org/elasticsearch/Build.java index be76564e52f6b..6c354b2fb5fa1 100644 --- a/server/src/main/java/org/elasticsearch/Build.java +++ b/server/src/main/java/org/elasticsearch/Build.java @@ -190,7 +190,7 @@ static URL getElasticsearchCodeSourceLocation() { public static Build readBuild(StreamInput in) throws IOException { final String flavor; if (in.getTransportVersion().before(TransportVersions.V_8_3_0) - || in.getTransportVersion().onOrAfter(TransportVersions.V_8_500_039)) { + || in.getTransportVersion().onOrAfter(TransportVersions.V_8_500_040)) { flavor = in.readString(); } else { flavor = "default"; @@ -221,7 +221,7 @@ public static Build readBuild(StreamInput in) throws IOException { public static void writeBuild(Build build, StreamOutput out) throws IOException { if (out.getTransportVersion().before(TransportVersions.V_8_3_0) - || out.getTransportVersion().onOrAfter(TransportVersions.V_8_500_039)) { + || out.getTransportVersion().onOrAfter(TransportVersions.V_8_500_040)) { out.writeString(build.flavor()); } out.writeString(build.type().displayName()); diff --git a/server/src/main/java/org/elasticsearch/TransportVersions.java b/server/src/main/java/org/elasticsearch/TransportVersions.java index c80383476b8c3..c49ff1b1f0d29 100644 --- a/server/src/main/java/org/elasticsearch/TransportVersions.java +++ b/server/src/main/java/org/elasticsearch/TransportVersions.java @@ -85,25 +85,6 @@ static TransportVersion def(int id) { * Detached transport versions added below here. */ public static final TransportVersion V_8_500_020 = def(8_500_020); - public static final TransportVersion V_8_500_021 = def(8_500_021); - public static final TransportVersion V_8_500_022 = def(8_500_022); - public static final TransportVersion V_8_500_023 = def(8_500_023); - public static final TransportVersion V_8_500_024 = def(8_500_024); - public static final TransportVersion V_8_500_025 = def(8_500_025); - public static final TransportVersion V_8_500_026 = def(8_500_026); - public static final TransportVersion V_8_500_027 = def(8_500_027); - public static final TransportVersion V_8_500_028 = def(8_500_028); - public static final TransportVersion V_8_500_029 = def(8_500_029); - public static final TransportVersion V_8_500_030 = def(8_500_030); - public static final TransportVersion V_8_500_031 = def(8_500_031); - public static final TransportVersion V_8_500_032 = def(8_500_032); - public static final TransportVersion V_8_500_033 = def(8_500_033); - public static final TransportVersion V_8_500_034 = def(8_500_034); - public static final TransportVersion V_8_500_035 = def(8_500_035); - public static final TransportVersion V_8_500_036 = def(8_500_036); - public static final TransportVersion V_8_500_037 = def(8_500_037); - public static final TransportVersion V_8_500_038 = def(8_500_038); - public static final TransportVersion V_8_500_039 = def(8_500_039); public static final TransportVersion V_8_500_040 = def(8_500_040); public static final TransportVersion V_8_500_041 = def(8_500_041); public static final TransportVersion V_8_500_042 = def(8_500_042); diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/ReloadAnalyzersRequest.java b/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/ReloadAnalyzersRequest.java index 26432922c1f24..31c5f57ab5eef 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/ReloadAnalyzersRequest.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/ReloadAnalyzersRequest.java @@ -9,6 +9,7 @@ package org.elasticsearch.action.admin.indices.analyze; import org.elasticsearch.TransportVersion; +import org.elasticsearch.TransportVersions; import org.elasticsearch.action.support.broadcast.BroadcastRequest; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -17,8 +18,6 @@ import java.util.Arrays; import java.util.Objects; -import static org.elasticsearch.TransportVersions.V_8_500_034; - /** * Request for reloading index search analyzers */ @@ -26,7 +25,7 @@ public class ReloadAnalyzersRequest extends BroadcastRequest { @Override public TransportVersion getMinimalSupportedVersion() { - return TransportVersions.V_8_500_033; + return TransportVersions.V_8_500_040; } public RuleQueryBuilder(QueryBuilder organicQuery, Map matchCriteria, String rulesetId) { diff --git a/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/action/EqlSearchResponse.java b/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/action/EqlSearchResponse.java index 0640347a7ea91..c22cf7d390628 100644 --- a/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/action/EqlSearchResponse.java +++ b/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/action/EqlSearchResponse.java @@ -281,7 +281,7 @@ private Event(StreamInput in) throws IOException { } else { fetchFields = null; } - if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_500_038)) { + if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_500_040)) { missing = in.readBoolean(); } else { missing = index.isEmpty(); @@ -304,7 +304,7 @@ public void writeTo(StreamOutput out) throws IOException { out.writeMap(fetchFields, StreamOutput::writeWriteable); } } - if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_500_038)) { + if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_500_040)) { // for BWC, 8.9.1+ does not have "missing" attribute, but it considers events with an empty index "" as missing events // see https://github.com/elastic/elasticsearch/pull/98130 out.writeBoolean(missing); diff --git a/x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlSearchResponseTests.java b/x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlSearchResponseTests.java index 765fd94d4c6be..080cc26d81eb2 100644 --- a/x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlSearchResponseTests.java +++ b/x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlSearchResponseTests.java @@ -289,7 +289,7 @@ private List mutateEvents(List original, TransportVersion version) e.id(), e.source(), version.onOrAfter(TransportVersions.V_7_13_0) ? e.fetchFields() : null, - version.onOrAfter(TransportVersions.V_8_500_038) ? e.missing() : e.index().isEmpty() + version.onOrAfter(TransportVersions.V_8_500_040) ? e.missing() : e.index().isEmpty() ) ); }