Skip to content

Commit f74e8e4

Browse files
authored
Remove transport versions 8840_000 through 8798_000 (#136229)
ES-12334
1 parent 378fef8 commit f74e8e4

File tree

79 files changed

+187
-808
lines changed

Some content is hidden

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

79 files changed

+187
-808
lines changed

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/AddIndexBlockRollingUpgradeIT.java

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import com.carrotsearch.randomizedtesting.annotations.Name;
1515

16-
import org.elasticsearch.TransportVersions;
1716
import org.elasticsearch.client.Request;
1817
import org.elasticsearch.client.ResponseException;
1918
import org.elasticsearch.cluster.metadata.IndexMetadata;
@@ -38,20 +37,15 @@ public void testAddBlock() throws Exception {
3837
createIndex(INDEX_NAME);
3938
} else if (isMixedCluster()) {
4039
blockWrites();
41-
// this is used both for upgrading from 9.0.0 to current and from 8.18 to current.
42-
if (minimumTransportVersion().before(TransportVersions.ADD_INDEX_BLOCK_TWO_PHASE)) {
43-
assertNull(verifiedSettingValue());
44-
} else {
45-
assertThat(verifiedSettingValue(), Matchers.equalTo("true"));
40+
assertThat(verifiedSettingValue(), Matchers.equalTo("true"));
4641

47-
expectThrows(
48-
ResponseException.class,
49-
() -> updateIndexSettings(
50-
INDEX_NAME,
51-
Settings.builder().putNull(MetadataIndexStateService.VERIFIED_READ_ONLY_SETTING.getKey())
52-
)
53-
);
54-
}
42+
expectThrows(
43+
ResponseException.class,
44+
() -> updateIndexSettings(
45+
INDEX_NAME,
46+
Settings.builder().putNull(MetadataIndexStateService.VERIFIED_READ_ONLY_SETTING.getKey())
47+
)
48+
);
5549
} else {
5650
assertTrue(isUpgradedCluster());
5751
blockWrites();

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

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -93,50 +93,8 @@ static TransportVersion def(int id) {
9393
public static final TransportVersion V_8_17_0 = def(8_797_0_02);
9494
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_3 = def(8_797_0_03);
9595
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_4 = def(8_797_0_04);
96+
// TODO: leave this version until the very end to satisfy max transport version test
9697
public static final TransportVersion INITIAL_ELASTICSEARCH_8_17_5 = def(8_797_0_05);
97-
public static final TransportVersion INDEXING_PRESSURE_THROTTLING_STATS = def(8_798_0_00);
98-
public static final TransportVersion REINDEX_DATA_STREAMS = def(8_799_0_00);
99-
public static final TransportVersion ESQL_REMOVE_NODE_LEVEL_PLAN = def(8_800_0_00);
100-
public static final TransportVersion LOGSDB_TELEMETRY_CUSTOM_CUTOFF_DATE = def(8_801_0_00);
101-
public static final TransportVersion SOURCE_MODE_TELEMETRY = def(8_802_0_00);
102-
public static final TransportVersion NEW_REFRESH_CLUSTER_BLOCK = def(8_803_0_00);
103-
public static final TransportVersion RETRIES_AND_OPERATIONS_IN_BLOBSTORE_STATS = def(8_804_0_00);
104-
public static final TransportVersion ADD_DATA_STREAM_OPTIONS_TO_TEMPLATES = def(8_805_0_00);
105-
public static final TransportVersion KNN_QUERY_RESCORE_OVERSAMPLE = def(8_806_0_00);
106-
public static final TransportVersion SEMANTIC_QUERY_LENIENT = def(8_807_0_00);
107-
public static final TransportVersion ESQL_QUERY_BUILDER_IN_SEARCH_FUNCTIONS = def(8_808_0_00);
108-
public static final TransportVersion EQL_ALLOW_PARTIAL_SEARCH_RESULTS = def(8_809_0_00);
109-
public static final TransportVersion NODE_VERSION_INFORMATION_WITH_MIN_READ_ONLY_INDEX_VERSION = def(8_810_0_00);
110-
public static final TransportVersion ERROR_TRACE_IN_TRANSPORT_HEADER = def(8_811_0_00);
111-
public static final TransportVersion FAILURE_STORE_ENABLED_BY_CLUSTER_SETTING = def(8_812_0_00);
112-
public static final TransportVersion SIMULATE_IGNORED_FIELDS = def(8_813_0_00);
113-
public static final TransportVersion TRANSFORMS_UPGRADE_MODE = def(8_814_0_00);
114-
public static final TransportVersion NODE_SHUTDOWN_EPHEMERAL_ID_ADDED = def(8_815_0_00);
115-
public static final TransportVersion ESQL_CCS_TELEMETRY_STATS = def(8_816_0_00);
116-
public static final TransportVersion TEXT_EMBEDDING_QUERY_VECTOR_BUILDER_INFER_MODEL_ID = def(8_817_0_00);
117-
public static final TransportVersion ESQL_ENABLE_NODE_LEVEL_REDUCTION = def(8_818_0_00);
118-
public static final TransportVersion JINA_AI_INTEGRATION_ADDED = def(8_819_0_00);
119-
public static final TransportVersion TRACK_INDEX_FAILED_DUE_TO_VERSION_CONFLICT_METRIC = def(8_820_0_00);
120-
public static final TransportVersion REPLACE_FAILURE_STORE_OPTIONS_WITH_SELECTOR_SYNTAX = def(8_821_0_00);
121-
public static final TransportVersion ELASTIC_INFERENCE_SERVICE_UNIFIED_CHAT_COMPLETIONS_INTEGRATION = def(8_822_0_00);
122-
public static final TransportVersion KQL_QUERY_TECH_PREVIEW = def(8_823_0_00);
123-
public static final TransportVersion ESQL_PROFILE_ROWS_PROCESSED = def(8_824_0_00);
124-
public static final TransportVersion BYTE_SIZE_VALUE_ALWAYS_USES_BYTES_1 = def(8_825_0_00);
125-
public static final TransportVersion REVERT_BYTE_SIZE_VALUE_ALWAYS_USES_BYTES_1 = def(8_826_0_00);
126-
public static final TransportVersion ESQL_SKIP_ES_INDEX_SERIALIZATION = def(8_827_0_00);
127-
public static final TransportVersion ADD_INDEX_BLOCK_TWO_PHASE = def(8_828_0_00);
128-
public static final TransportVersion RESOLVE_CLUSTER_NO_INDEX_EXPRESSION = def(8_829_0_00);
129-
public static final TransportVersion ML_ROLLOVER_LEGACY_INDICES = def(8_830_0_00);
130-
public static final TransportVersion ADD_INCLUDE_FAILURE_INDICES_OPTION = def(8_831_0_00);
131-
public static final TransportVersion ESQL_RESPONSE_PARTIAL = def(8_832_0_00);
132-
public static final TransportVersion RANK_DOC_OPTIONAL_METADATA_FOR_EXPLAIN = def(8_833_0_00);
133-
public static final TransportVersion ILM_ADD_SEARCHABLE_SNAPSHOT_ADD_REPLICATE_FOR = def(8_834_0_00);
134-
public static final TransportVersion INGEST_REQUEST_INCLUDE_SOURCE_ON_ERROR = def(8_835_0_00);
135-
public static final TransportVersion RESOURCE_DEPRECATION_CHECKS = def(8_836_0_00);
136-
public static final TransportVersion LINEAR_RETRIEVER_SUPPORT = def(8_837_0_00);
137-
public static final TransportVersion TIMEOUT_GET_PARAM_FOR_RESOLVE_CLUSTER = def(8_838_0_00);
138-
public static final TransportVersion INFERENCE_REQUEST_ADAPTIVE_RATE_LIMITING = def(8_839_0_00);
139-
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_RERANK_ADDED = def(8_840_0_00);
14098

14199
/*
142100
* STOP! READ THIS FIRST! No, really,

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ public ClusterStatsNodeResponse(StreamInput in) throws IOException {
5252
repositoryUsageStats = RepositoryUsageStats.EMPTY;
5353
searchCcsMetrics = new CCSTelemetrySnapshot();
5454
}
55-
if (in.getTransportVersion().onOrAfter(TransportVersions.ESQL_CCS_TELEMETRY_STATS)) {
56-
esqlCcsMetrics = new CCSTelemetrySnapshot(in);
57-
} else {
58-
esqlCcsMetrics = new CCSTelemetrySnapshot();
59-
}
55+
esqlCcsMetrics = new CCSTelemetrySnapshot(in);
6056
}
6157

6258
public ClusterStatsNodeResponse(
@@ -131,9 +127,7 @@ public void writeTo(StreamOutput out) throws IOException {
131127
repositoryUsageStats.writeTo(out);
132128
searchCcsMetrics.writeTo(out);
133129
} // else just drop these stats, ok for bwc
134-
if (out.getTransportVersion().onOrAfter(TransportVersions.ESQL_CCS_TELEMETRY_STATS)) {
135-
esqlCcsMetrics.writeTo(out);
136-
}
130+
esqlCcsMetrics.writeTo(out);
137131
}
138132

139133
}

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

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

1010
package org.elasticsearch.action.admin.cluster.stats;
1111

12-
import org.elasticsearch.TransportVersion;
1312
import org.elasticsearch.TransportVersions;
1413
import org.elasticsearch.cluster.metadata.IndexMetadata;
1514
import org.elasticsearch.cluster.metadata.MappingMetadata;
@@ -270,9 +269,7 @@ private static int countOccurrences(String script, Pattern pattern) {
270269
fieldTypeStats = in.readCollectionAsImmutableList(FieldStats::new);
271270
runtimeFieldStats = in.readCollectionAsImmutableList(RuntimeFieldStats::new);
272271
var transportVersion = in.getTransportVersion();
273-
sourceModeUsageCount = canReadOrWriteSourceModeTelemetry(transportVersion)
274-
? in.readImmutableMap(StreamInput::readString, StreamInput::readVInt)
275-
: Map.of();
272+
sourceModeUsageCount = in.readImmutableMap(StreamInput::readString, StreamInput::readVInt);
276273
}
277274

278275
@Override
@@ -284,14 +281,7 @@ public void writeTo(StreamOutput out) throws IOException {
284281
}
285282
out.writeCollection(fieldTypeStats);
286283
out.writeCollection(runtimeFieldStats);
287-
var transportVersion = out.getTransportVersion();
288-
if (canReadOrWriteSourceModeTelemetry(transportVersion)) {
289-
out.writeMap(sourceModeUsageCount, StreamOutput::writeVInt);
290-
}
291-
}
292-
293-
private static boolean canReadOrWriteSourceModeTelemetry(TransportVersion version) {
294-
return version.isPatchFrom(TransportVersions.V_8_17_0) || version.onOrAfter(TransportVersions.SOURCE_MODE_TELEMETRY);
284+
out.writeMap(sourceModeUsageCount, StreamOutput::writeVInt);
295285
}
296286

297287
private static OptionalLong ofNullable(Long l) {

server/src/main/java/org/elasticsearch/action/admin/indices/readonly/AddIndexBlockRequest.java

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

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

12-
import org.elasticsearch.TransportVersions;
1312
import org.elasticsearch.action.ActionRequestValidationException;
1413
import org.elasticsearch.action.IndicesRequest;
1514
import org.elasticsearch.action.support.IndicesOptions;
@@ -40,11 +39,7 @@ public AddIndexBlockRequest(StreamInput in) throws IOException {
4039
indices = in.readStringArray();
4140
indicesOptions = IndicesOptions.readIndicesOptions(in);
4241
block = APIBlock.readFrom(in);
43-
if (in.getTransportVersion().onOrAfter(TransportVersions.ADD_INDEX_BLOCK_TWO_PHASE)) {
44-
markVerified = in.readBoolean();
45-
} else {
46-
markVerified = false;
47-
}
42+
markVerified = in.readBoolean();
4843
}
4944

5045
/**
@@ -132,9 +127,7 @@ public void writeTo(StreamOutput out) throws IOException {
132127
out.writeStringArray(indices);
133128
indicesOptions.writeIndicesOptions(out);
134129
block.writeTo(out);
135-
if (out.getTransportVersion().onOrAfter(TransportVersions.ADD_INDEX_BLOCK_TWO_PHASE)) {
136-
out.writeBoolean(markVerified);
137-
}
130+
out.writeBoolean(markVerified);
138131
}
139132

140133
@Override

server/src/main/java/org/elasticsearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99
package org.elasticsearch.action.admin.indices.readonly;
1010

11-
import org.elasticsearch.TransportVersions;
1211
import org.elasticsearch.action.ActionListener;
1312
import org.elasticsearch.action.ActionType;
1413
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
@@ -181,11 +180,7 @@ public static final class ShardRequest extends ReplicationRequest<ShardRequest>
181180
ShardRequest(StreamInput in) throws IOException {
182181
super(in);
183182
clusterBlock = new ClusterBlock(in);
184-
if (in.getTransportVersion().onOrAfter(TransportVersions.ADD_INDEX_BLOCK_TWO_PHASE)) {
185-
phase1 = in.readBoolean();
186-
} else {
187-
phase1 = true; // does not matter, not verified anyway
188-
}
183+
phase1 = in.readBoolean();
189184
}
190185

191186
public ShardRequest(final ShardId shardId, final ClusterBlock clusterBlock, boolean phase1, final TaskId parentTaskId) {
@@ -204,9 +199,7 @@ public String toString() {
204199
public void writeTo(final StreamOutput out) throws IOException {
205200
super.writeTo(out);
206201
clusterBlock.writeTo(out);
207-
if (out.getTransportVersion().onOrAfter(TransportVersions.ADD_INDEX_BLOCK_TWO_PHASE)) {
208-
out.writeBoolean(phase1);
209-
}
202+
out.writeBoolean(phase1);
210203
}
211204

212205
public ClusterBlock clusterBlock() {

server/src/main/java/org/elasticsearch/action/admin/indices/resolve/ResolveClusterActionRequest.java

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,9 @@ public ResolveClusterActionRequest(StreamInput in) throws IOException {
8484
this.names = in.readStringArray();
8585
this.indicesOptions = IndicesOptions.readIndicesOptions(in);
8686
this.localIndicesRequested = localIndicesPresent(names);
87-
if (in.getTransportVersion().onOrAfter(TransportVersions.RESOLVE_CLUSTER_NO_INDEX_EXPRESSION)) {
88-
this.clusterInfoOnly = in.readBoolean();
89-
this.isQueryingCluster = in.readBoolean();
90-
} else {
91-
this.clusterInfoOnly = false;
92-
this.isQueryingCluster = false;
93-
}
94-
if (in.getTransportVersion().onOrAfter(TransportVersions.TIMEOUT_GET_PARAM_FOR_RESOLVE_CLUSTER)) {
95-
this.timeout = in.readOptionalTimeValue();
96-
}
87+
this.clusterInfoOnly = in.readBoolean();
88+
this.isQueryingCluster = in.readBoolean();
89+
this.timeout = in.readOptionalTimeValue();
9790
}
9891

9992
@Override
@@ -104,13 +97,9 @@ public void writeTo(StreamOutput out) throws IOException {
10497
}
10598
out.writeStringArray(names);
10699
indicesOptions.writeIndicesOptions(out);
107-
if (out.getTransportVersion().onOrAfter(TransportVersions.RESOLVE_CLUSTER_NO_INDEX_EXPRESSION)) {
108-
out.writeBoolean(clusterInfoOnly);
109-
out.writeBoolean(isQueryingCluster);
110-
}
111-
if (out.getTransportVersion().onOrAfter(TransportVersions.TIMEOUT_GET_PARAM_FOR_RESOLVE_CLUSTER)) {
112-
out.writeOptionalTimeValue(timeout);
113-
}
100+
out.writeBoolean(clusterInfoOnly);
101+
out.writeBoolean(isQueryingCluster);
102+
out.writeOptionalTimeValue(timeout);
114103
}
115104

116105
static String createVersionErrorMessage(TransportVersion versionFound) {

server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ public BulkRequest(StreamInput in) throws IOException {
112112
} else {
113113
incrementalState = BulkRequest.IncrementalState.EMPTY;
114114
}
115-
if (in.getTransportVersion().onOrAfter(TransportVersions.INGEST_REQUEST_INCLUDE_SOURCE_ON_ERROR)) {
116-
includeSourceOnError = in.readBoolean();
117-
} // else default value is true
115+
includeSourceOnError = in.readBoolean();
118116
if (in.getTransportVersion().supports(STREAMS_ENDPOINT_PARAM_RESTRICTIONS)) {
119117
paramsUsed = in.readCollectionAsImmutableSet(StreamInput::readString);
120118
}
@@ -481,9 +479,7 @@ public void writeTo(StreamOutput out) throws IOException {
481479
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_16_0)) {
482480
incrementalState.writeTo(out);
483481
}
484-
if (out.getTransportVersion().onOrAfter(TransportVersions.INGEST_REQUEST_INCLUDE_SOURCE_ON_ERROR)) {
485-
out.writeBoolean(includeSourceOnError);
486-
}
482+
out.writeBoolean(includeSourceOnError);
487483
if (out.getTransportVersion().supports(STREAMS_ENDPOINT_PARAM_RESTRICTIONS)) {
488484
out.writeCollection(paramsUsed, StreamOutput::writeString);
489485
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,7 @@ public String getIndexModeName() {
339339
@Override
340340
public void writeTo(StreamOutput out) throws IOException {
341341
dataStream.writeTo(out);
342-
if (out.getTransportVersion().onOrAfter(TransportVersions.FAILURE_STORE_ENABLED_BY_CLUSTER_SETTING)) {
343-
out.writeBoolean(failureStoreEffectivelyEnabled);
344-
}
342+
out.writeBoolean(failureStoreEffectivelyEnabled);
345343
dataStreamStatus.writeTo(out);
346344
out.writeOptionalString(indexTemplate);
347345
out.writeOptionalString(ilmPolicyName);

server/src/main/java/org/elasticsearch/action/index/IndexRequest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ public IndexRequest(@Nullable ShardId shardId, StreamInput in) throws IOExceptio
227227
}
228228
}
229229

230-
if (in.getTransportVersion().onOrAfter(TransportVersions.INGEST_REQUEST_INCLUDE_SOURCE_ON_ERROR)) {
231-
includeSourceOnError = in.readBoolean();
232-
} // else default value is true
230+
includeSourceOnError = in.readBoolean();
233231

234232
if (in.getTransportVersion().supports(INDEX_REQUEST_INCLUDE_TSID)) {
235233
tsid = in.readBytesRefOrNullIfEmpty();
@@ -817,9 +815,7 @@ private void writeBody(StreamOutput out) throws IOException {
817815
out.writeBoolean(false); // obsolete originatesFromUpdateByDoc
818816
}
819817
}
820-
if (out.getTransportVersion().onOrAfter(TransportVersions.INGEST_REQUEST_INCLUDE_SOURCE_ON_ERROR)) {
821-
out.writeBoolean(includeSourceOnError);
822-
}
818+
out.writeBoolean(includeSourceOnError);
823819
if (out.getTransportVersion().supports(INDEX_REQUEST_INCLUDE_TSID)) {
824820
out.writeBytesRef(tsid);
825821
}

0 commit comments

Comments
 (0)