Skip to content

Commit

Permalink
Changing version for repo stats blob post backport to 2.x (opensearch…
Browse files Browse the repository at this point in the history
…-project#10717)

Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna authored Oct 19, 2023
1 parent 1d23b88 commit 3899d11
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public NodeStats(StreamInput in) throws IOException {
} else {
resourceUsageStats = null;
}
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_12_0)) {
repositoriesStats = in.readOptionalWriteable(RepositoriesStats::new);
} else {
repositoriesStats = null;
Expand Down Expand Up @@ -465,7 +465,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_2_12_0)) {
out.writeOptionalWriteable(resourceUsageStats);
}
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_12_0)) {
out.writeOptionalWriteable(repositoriesStats);
}
}
Expand Down

0 comments on commit 3899d11

Please sign in to comment.