Skip to content

Commit

Permalink
remove usages of version
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <[email protected]>
  • Loading branch information
Rishikesh1159 committed Mar 16, 2023
1 parent 3555a7d commit 5631c93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public NodeStats(StreamInput in) throws IOException {
} else {
weightedRoutingStats = null;
}
if (in.getVersion().onOrAfter(Version.V_2_7_0) && FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT)) {
if (in.getVersion().onOrAfter(Version.V_2_6_0) && FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT)) {
fileCacheStats = in.readOptionalWriteable(FileCacheStats::new);
} else {
fileCacheStats = null;
Expand Down Expand Up @@ -409,7 +409,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_2_6_0)) {
out.writeOptionalWriteable(weightedRoutingStats);
}
if (out.getVersion().onOrAfter(Version.V_2_7_0) && FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT)) {
if (out.getVersion().onOrAfter(Version.V_2_6_0) && FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT)) {
out.writeOptionalWriteable(fileCacheStats);
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/monitor/fs/FsInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public Path(StreamInput in) throws IOException {
total = in.readLong();
free = in.readLong();
available = in.readLong();
if (FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT) && in.getVersion().onOrAfter(Version.V_2_7_0)) {
if (FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT) && in.getVersion().onOrAfter(Version.V_2_6_0)) {
fileCacheReserved = in.readLong();
fileCacheUtilized = in.readLong();
}
Expand All @@ -111,7 +111,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeLong(total);
out.writeLong(free);
out.writeLong(available);
if (FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT) && out.getVersion().onOrAfter(Version.V_2_7_0)) {
if (FeatureFlags.isEnabled(FeatureFlags.SEARCHABLE_SNAPSHOT) && out.getVersion().onOrAfter(Version.V_2_6_0)) {
out.writeLong(fileCacheReserved);
out.writeLong(fileCacheUtilized);
}
Expand Down

0 comments on commit 5631c93

Please sign in to comment.