Skip to content

Commit b218f69

Browse files
authored
Remove 7.13 and 7.14 transport versions (#124115)
1 parent 135b165 commit b218f69

File tree

29 files changed

+65
-184
lines changed

29 files changed

+65
-184
lines changed

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpTaskParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public String getWriteableName() {
4444

4545
@Override
4646
public TransportVersion getMinimalSupportedVersion() {
47-
return TransportVersions.V_7_13_0;
47+
return TransportVersions.ZERO;
4848
}
4949

5050
@Override

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpTaskState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public String getWriteableName() {
132132

133133
@Override
134134
public TransportVersion getMinimalSupportedVersion() {
135-
return TransportVersions.V_7_13_0;
135+
return TransportVersions.ZERO;
136136
}
137137

138138
@Override

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ static TransportVersion def(int id) {
6060
public static final TransportVersion V_7_8_1 = def(7_08_01_99);
6161
public static final TransportVersion V_7_9_0 = def(7_09_00_99);
6262
public static final TransportVersion V_7_10_0 = def(7_10_00_99);
63-
public static final TransportVersion V_7_13_0 = def(7_13_00_99);
64-
public static final TransportVersion V_7_14_0 = def(7_14_00_99);
6563
public static final TransportVersion V_7_15_0 = def(7_15_00_99);
6664
public static final TransportVersion V_7_15_1 = def(7_15_01_99);
6765
public static final TransportVersion V_7_16_0 = def(7_16_00_99);

server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksRequest.java

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

1010
package org.elasticsearch.action.admin.cluster.node.tasks.list;
1111

12-
import org.elasticsearch.TransportVersions;
1312
import org.elasticsearch.action.ActionRequestValidationException;
1413
import org.elasticsearch.action.support.tasks.BaseTasksRequest;
1514
import org.elasticsearch.common.Strings;
@@ -44,19 +43,15 @@ public ListTasksRequest(StreamInput in) throws IOException {
4443
super(in);
4544
detailed = in.readBoolean();
4645
waitForCompletion = in.readBoolean();
47-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_7_13_0)) {
48-
descriptions = in.readStringArray();
49-
}
46+
descriptions = in.readStringArray();
5047
}
5148

5249
@Override
5350
public void writeTo(StreamOutput out) throws IOException {
5451
super.writeTo(out);
5552
out.writeBoolean(detailed);
5653
out.writeBoolean(waitForCompletion);
57-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_7_13_0)) {
58-
out.writeStringArray(descriptions);
59-
}
54+
out.writeStringArray(descriptions);
6055
}
6156

6257
@Override

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public class ClusterInfo implements ChunkedToXContent, Writeable {
4949

5050
public static final ClusterInfo EMPTY = new ClusterInfo();
5151

52-
public static final TransportVersion DATA_SET_SIZE_SIZE_VERSION = TransportVersions.V_7_13_0;
5352
public static final TransportVersion DATA_PATH_NEW_KEY_VERSION = TransportVersions.V_8_6_0;
5453

5554
private final Map<String, DiskUsage> leastAvailableSpaceUsage;
@@ -94,9 +93,7 @@ public ClusterInfo(StreamInput in) throws IOException {
9493
this.leastAvailableSpaceUsage = in.readImmutableMap(DiskUsage::new);
9594
this.mostAvailableSpaceUsage = in.readImmutableMap(DiskUsage::new);
9695
this.shardSizes = in.readImmutableMap(StreamInput::readLong);
97-
this.shardDataSetSizes = in.getTransportVersion().onOrAfter(DATA_SET_SIZE_SIZE_VERSION)
98-
? in.readImmutableMap(ShardId::new, StreamInput::readLong)
99-
: Map.of();
96+
this.shardDataSetSizes = in.readImmutableMap(ShardId::new, StreamInput::readLong);
10097
this.dataPath = in.getTransportVersion().onOrAfter(DATA_PATH_NEW_KEY_VERSION)
10198
? in.readImmutableMap(NodeAndShard::new, StreamInput::readString)
10299
: in.readImmutableMap(nested -> NodeAndShard.from(new ShardRouting(nested)), StreamInput::readString);
@@ -108,9 +105,7 @@ public void writeTo(StreamOutput out) throws IOException {
108105
out.writeMap(this.leastAvailableSpaceUsage, StreamOutput::writeWriteable);
109106
out.writeMap(this.mostAvailableSpaceUsage, StreamOutput::writeWriteable);
110107
out.writeMap(this.shardSizes, (o, v) -> o.writeLong(v == null ? -1 : v));
111-
if (out.getTransportVersion().onOrAfter(DATA_SET_SIZE_SIZE_VERSION)) {
112-
out.writeMap(this.shardDataSetSizes, StreamOutput::writeWriteable, StreamOutput::writeLong);
113-
}
108+
out.writeMap(this.shardDataSetSizes, StreamOutput::writeWriteable, StreamOutput::writeLong);
114109
if (out.getTransportVersion().onOrAfter(DATA_PATH_NEW_KEY_VERSION)) {
115110
out.writeMap(this.dataPath, StreamOutput::writeWriteable, StreamOutput::writeString);
116111
} else {

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
*/
4444
public class NodesShutdownMetadata implements Metadata.ClusterCustom {
4545
public static final String TYPE = "node_shutdown";
46-
public static final TransportVersion NODE_SHUTDOWN_VERSION = TransportVersions.V_7_13_0;
4746
public static final NodesShutdownMetadata EMPTY = new NodesShutdownMetadata(Map.of());
4847

4948
private static final ParseField NODES_FIELD = new ParseField("nodes");
@@ -173,7 +172,7 @@ public String getWriteableName() {
173172

174173
@Override
175174
public TransportVersion getMinimalSupportedVersion() {
176-
return NODE_SHUTDOWN_VERSION;
175+
return TransportVersions.ZERO;
177176
}
178177

179178
@Override
@@ -236,7 +235,7 @@ static Diff<SingleNodeShutdownMetadata> readNodesDiffFrom(StreamInput in) throws
236235

237236
@Override
238237
public TransportVersion getMinimalSupportedVersion() {
239-
return NODE_SHUTDOWN_VERSION;
238+
return TransportVersions.ZERO;
240239
}
241240

242241
}

server/src/main/java/org/elasticsearch/index/engine/SegmentsStats.java

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -251,19 +251,11 @@ public static class FileStats implements Writeable, ToXContentFragment {
251251
private final long max;
252252

253253
FileStats(StreamInput in) throws IOException {
254-
if (in.getTransportVersion().onOrAfter(TransportVersions.V_7_13_0)) {
255-
this.ext = in.readString();
256-
this.total = in.readVLong();
257-
this.count = in.readVLong();
258-
this.min = in.readVLong();
259-
this.max = in.readVLong();
260-
} else {
261-
this.ext = in.readString();
262-
this.total = in.readLong();
263-
this.count = 0L;
264-
this.min = 0L;
265-
this.max = 0L;
266-
}
254+
this.ext = in.readString();
255+
this.total = in.readVLong();
256+
this.count = in.readVLong();
257+
this.min = in.readVLong();
258+
this.max = in.readVLong();
267259
}
268260

269261
public FileStats(String ext, long total, long count, long min, long max) {
@@ -296,16 +288,11 @@ public long getMax() {
296288

297289
@Override
298290
public void writeTo(StreamOutput out) throws IOException {
299-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_7_13_0)) {
300-
out.writeString(ext);
301-
out.writeVLong(total);
302-
out.writeVLong(count);
303-
out.writeVLong(min);
304-
out.writeVLong(max);
305-
} else {
306-
out.writeString(ext);
307-
out.writeLong(total);
308-
}
291+
out.writeString(ext);
292+
out.writeVLong(total);
293+
out.writeVLong(count);
294+
out.writeVLong(min);
295+
out.writeVLong(max);
309296
}
310297

311298
@Override

server/src/main/java/org/elasticsearch/index/query/CombinedFieldsQueryBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,6 @@ protected boolean doEquals(CombinedFieldsQueryBuilder other) {
449449

450450
@Override
451451
public TransportVersion getMinimalSupportedVersion() {
452-
return TransportVersions.V_7_13_0;
452+
return TransportVersions.ZERO;
453453
}
454454
}

server/src/main/java/org/elasticsearch/index/store/StoreStats.java

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

1010
package org.elasticsearch.index.store;
1111

12-
import org.elasticsearch.TransportVersion;
13-
import org.elasticsearch.TransportVersions;
1412
import org.elasticsearch.common.io.stream.StreamInput;
1513
import org.elasticsearch.common.io.stream.StreamOutput;
1614
import org.elasticsearch.common.io.stream.Writeable;
@@ -29,8 +27,6 @@ public class StoreStats implements Writeable, ToXContentFragment {
2927
*/
3028
public static final long UNKNOWN_RESERVED_BYTES = -1L;
3129

32-
public static final TransportVersion TOTAL_DATA_SET_SIZE_SIZE_VERSION = TransportVersions.V_7_13_0;
33-
3430
private long sizeInBytes;
3531
private long totalDataSetSizeInBytes;
3632
private long reservedSizeInBytes;
@@ -41,11 +37,7 @@ public StoreStats() {
4137

4238
public StoreStats(StreamInput in) throws IOException {
4339
sizeInBytes = in.readVLong();
44-
if (in.getTransportVersion().onOrAfter(TOTAL_DATA_SET_SIZE_SIZE_VERSION)) {
45-
totalDataSetSizeInBytes = in.readVLong();
46-
} else {
47-
totalDataSetSizeInBytes = sizeInBytes;
48-
}
40+
totalDataSetSizeInBytes = in.readVLong();
4941
reservedSizeInBytes = in.readZLong();
5042
}
5143

@@ -107,9 +99,7 @@ public ByteSizeValue getReservedSize() {
10799
@Override
108100
public void writeTo(StreamOutput out) throws IOException {
109101
out.writeVLong(sizeInBytes);
110-
if (out.getTransportVersion().onOrAfter(TOTAL_DATA_SET_SIZE_SIZE_VERSION)) {
111-
out.writeVLong(totalDataSetSizeInBytes);
112-
}
102+
out.writeVLong(totalDataSetSizeInBytes);
113103
out.writeZLong(reservedSizeInBytes);
114104
}
115105

server/src/main/java/org/elasticsearch/transport/Compression.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import net.jpountz.lz4.LZ4Factory;
1414
import net.jpountz.lz4.LZ4FastDecompressor;
1515

16-
import org.elasticsearch.TransportVersion;
17-
import org.elasticsearch.TransportVersions;
1816
import org.elasticsearch.common.bytes.BytesReference;
1917
import org.elasticsearch.core.Booleans;
2018
import org.elasticsearch.lz4.ESLZ4Compressor;
@@ -29,7 +27,6 @@ public enum Scheme {
2927
LZ4,
3028
DEFLATE;
3129

32-
static final TransportVersion LZ4_VERSION = TransportVersions.V_7_14_0;
3330
static final int HEADER_LENGTH = 4;
3431
private static final byte[] DEFLATE_HEADER = new byte[] { 'D', 'F', 'L', '\0' };
3532
private static final byte[] LZ4_HEADER = new byte[] { 'L', 'Z', '4', '\0' };

0 commit comments

Comments
 (0)