Skip to content

Commit 807b914

Browse files
authored
[ML] Remove BWC guard after backport (#81301)
Since we've decided to do a 7.17 release, 8.1 will never need to run in a mixed version cluster with 7.16, so it's safe to remove the version guard on the new field in the ML autoscaling reason. Relates to #81123, #81303, #81304
1 parent 2295411 commit 807b914

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/MlScalingReason.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ public class MlScalingReason implements AutoscalingDeciderResult.Reason {
4848
public MlScalingReason(StreamInput in) throws IOException {
4949
this.waitingAnalyticsJobs = in.readStringList();
5050
this.waitingAnomalyJobs = in.readStringList();
51-
// TODO: change on backport
52-
if (in.getVersion().onOrAfter(Version.V_8_1_0)) {
53-
this.waitingSnapshotUpgrades = in.readStringList();
54-
} else {
55-
this.waitingSnapshotUpgrades = List.of();
56-
}
51+
this.waitingSnapshotUpgrades = in.readStringList();
5752
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
5853
this.waitingModels = in.readStringList();
5954
} else {
@@ -140,10 +135,7 @@ public String getWriteableName() {
140135
public void writeTo(StreamOutput out) throws IOException {
141136
out.writeStringCollection(this.waitingAnalyticsJobs);
142137
out.writeStringCollection(this.waitingAnomalyJobs);
143-
// TODO: change version on backport
144-
if (out.getVersion().onOrAfter(Version.V_8_1_0)) {
145-
out.writeStringCollection(this.waitingSnapshotUpgrades);
146-
}
138+
out.writeStringCollection(this.waitingSnapshotUpgrades);
147139
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
148140
out.writeStringCollection(this.waitingModels);
149141
}

0 commit comments

Comments
 (0)