Skip to content

Commit 0ad74fe

Browse files
kotwanikunalPeter Alfonsi
authored and
Peter Alfonsi
committed
Fix bwc for admission control (opensearch-project#12201)
Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
1 parent 84bd2f1 commit 0ad74fe

File tree

1 file changed

+2
-4
lines changed
  • server/src/main/java/org/opensearch/action/admin/cluster/node/stats

1 file changed

+2
-4
lines changed

server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ public NodeStats(StreamInput in) throws IOException {
229229
} else {
230230
repositoriesStats = null;
231231
}
232-
// TODO: change to V_2_12_0 on main after backport to 2.x
233-
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
232+
if (in.getVersion().onOrAfter(Version.V_2_12_0)) {
234233
admissionControlStats = in.readOptionalWriteable(AdmissionControlStats::new);
235234
} else {
236235
admissionControlStats = null;
@@ -504,8 +503,7 @@ public void writeTo(StreamOutput out) throws IOException {
504503
if (out.getVersion().onOrAfter(Version.V_2_12_0)) {
505504
out.writeOptionalWriteable(repositoriesStats);
506505
}
507-
// TODO: change to V_2_12_0 on main after backport to 2.x
508-
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
506+
if (out.getVersion().onOrAfter(Version.V_2_12_0)) {
509507
out.writeOptionalWriteable(admissionControlStats);
510508
}
511509
}

0 commit comments

Comments
 (0)