Skip to content

Commit 3b323dc

Browse files
authored
Collapse 8.16.1 transport versions (#124003)
1 parent 025acaa commit 3b323dc

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ static TransportVersion def(int id) {
9898
public static final TransportVersion V_8_15_0 = def(8_702_0_02);
9999
public static final TransportVersion V_8_15_2 = def(8_702_0_03);
100100
public static final TransportVersion V_8_16_0 = def(8_772_0_01);
101-
public static final TransportVersion ADD_COMPATIBILITY_VERSIONS_TO_NODE_INFO_BACKPORT_8_16 = def(8_772_0_02);
102-
public static final TransportVersion SKIP_INNER_HITS_SEARCH_SOURCE_BACKPORT_8_16 = def(8_772_0_03);
103-
public static final TransportVersion QUERY_RULES_LIST_INCLUDES_TYPES_BACKPORT_8_16 = def(8_772_0_04);
101+
public static final TransportVersion V_8_16_1 = def(8_772_0_04);
104102
public static final TransportVersion INITIAL_ELASTICSEARCH_8_16_5 = def(8_772_0_05);
105103
public static final TransportVersion INITIAL_ELASTICSEARCH_8_16_6 = def(8_772_0_06);
106104
public static final TransportVersion REMOVE_MIN_COMPATIBLE_SHARD_NODE = def(8_773_0_00);

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public NodeInfo(StreamInput in) throws IOException {
6666
super(in);
6767
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_12_0)) {
6868
version = in.readString();
69-
if (in.getTransportVersion().isPatchFrom(TransportVersions.ADD_COMPATIBILITY_VERSIONS_TO_NODE_INFO_BACKPORT_8_16)
69+
if (in.getTransportVersion().isPatchFrom(TransportVersions.V_8_16_1)
7070
|| in.getTransportVersion().onOrAfter(TransportVersions.ADD_COMPATIBILITY_VERSIONS_TO_NODE_INFO)) {
7171
compatibilityVersions = CompatibilityVersions.readVersion(in);
7272
} else {
@@ -252,7 +252,7 @@ public void writeTo(StreamOutput out) throws IOException {
252252
} else {
253253
Version.writeVersion(Version.fromString(version), out);
254254
}
255-
if (out.getTransportVersion().isPatchFrom(TransportVersions.ADD_COMPATIBILITY_VERSIONS_TO_NODE_INFO_BACKPORT_8_16)
255+
if (out.getTransportVersion().isPatchFrom(TransportVersions.V_8_16_1)
256256
|| out.getTransportVersion().onOrAfter(TransportVersions.ADD_COMPATIBILITY_VERSIONS_TO_NODE_INFO)) {
257257
compatibilityVersions.writeTo(out);
258258
} else if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_8_0)) {

server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public SearchSourceBuilder(StreamInput in) throws IOException {
288288
if (in.getTransportVersion().onOrAfter(TransportVersions.V_8_8_0)) {
289289
rankBuilder = in.readOptionalNamedWriteable(RankBuilder.class);
290290
}
291-
if (in.getTransportVersion().isPatchFrom(TransportVersions.SKIP_INNER_HITS_SEARCH_SOURCE_BACKPORT_8_16)
291+
if (in.getTransportVersion().isPatchFrom(TransportVersions.V_8_16_1)
292292
|| in.getTransportVersion().onOrAfter(TransportVersions.SKIP_INNER_HITS_SEARCH_SOURCE)) {
293293
skipInnerHits = in.readBoolean();
294294
} else {
@@ -383,7 +383,7 @@ public void writeTo(StreamOutput out) throws IOException {
383383
} else if (rankBuilder != null) {
384384
throw new IllegalArgumentException("cannot serialize [rank] to version [" + out.getTransportVersion().toReleaseVersion() + "]");
385385
}
386-
if (out.getTransportVersion().isPatchFrom(TransportVersions.SKIP_INNER_HITS_SEARCH_SOURCE_BACKPORT_8_16)
386+
if (out.getTransportVersion().isPatchFrom(TransportVersions.V_8_16_1)
387387
|| out.getTransportVersion().onOrAfter(TransportVersions.SKIP_INNER_HITS_SEARCH_SOURCE)) {
388388
out.writeBoolean(skipInnerHits);
389389
}

x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/rules/QueryRulesetListItem.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public QueryRulesetListItem(StreamInput in) throws IOException {
6868
this.criteriaTypeToCountMap = Map.of();
6969
}
7070
TransportVersion streamTransportVersion = in.getTransportVersion();
71-
if (streamTransportVersion.isPatchFrom(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES_BACKPORT_8_16)
71+
if (streamTransportVersion.isPatchFrom(TransportVersions.V_8_16_1)
7272
|| streamTransportVersion.onOrAfter(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES)) {
7373
this.ruleTypeToCountMap = in.readMap(m -> in.readEnum(QueryRule.QueryRuleType.class), StreamInput::readInt);
7474
} else {
@@ -103,7 +103,7 @@ public void writeTo(StreamOutput out) throws IOException {
103103
out.writeMap(criteriaTypeToCountMap, StreamOutput::writeEnum, StreamOutput::writeInt);
104104
}
105105
TransportVersion streamTransportVersion = out.getTransportVersion();
106-
if (streamTransportVersion.isPatchFrom(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES_BACKPORT_8_16)
106+
if (streamTransportVersion.isPatchFrom(TransportVersions.V_8_16_1)
107107
|| streamTransportVersion.onOrAfter(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES)) {
108108
out.writeMap(ruleTypeToCountMap, StreamOutput::writeEnum, StreamOutput::writeInt);
109109
}

x-pack/plugin/ent-search/src/test/java/org/elasticsearch/xpack/application/rules/action/ListQueryRulesetsActionResponseBWCSerializingTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ protected ListQueryRulesetsAction.Response mutateInstanceForVersion(
5959
ListQueryRulesetsAction.Response instance,
6060
TransportVersion version
6161
) {
62-
if (version.isPatchFrom(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES_BACKPORT_8_16)
63-
|| version.onOrAfter(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES)) {
62+
if (version.isPatchFrom(TransportVersions.V_8_16_1) || version.onOrAfter(TransportVersions.QUERY_RULES_LIST_INCLUDES_TYPES)) {
6463
return instance;
6564
} else if (version.onOrAfter(QueryRulesetListItem.EXPANDED_RULESET_COUNT_TRANSPORT_VERSION)) {
6665
List<QueryRulesetListItem> updatedResults = new ArrayList<>();

0 commit comments

Comments
 (0)