Skip to content

Commit

Permalink
Support for Heap after GC stats (correction after backport to 1.2.0) (#…
Browse files Browse the repository at this point in the history
…1315)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta authored Sep 30, 2021
1 parent 80388a8 commit 180db5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public MemoryPool(StreamInput in) throws IOException {
max = in.readVLong();
peakUsed = in.readVLong();
peakMax = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_2_0_0)) {
if (in.getVersion().onOrAfter(Version.V_1_2_0)) {
lastGcStats = new MemoryPoolGcStats(in);
} else {
lastGcStats = new MemoryPoolGcStats(0, 0);
Expand All @@ -514,7 +514,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(max);
out.writeVLong(peakUsed);
out.writeVLong(peakMax);
if (out.getVersion().onOrAfter(Version.V_2_0_0)) {
if (out.getVersion().onOrAfter(Version.V_1_2_0)) {
lastGcStats.writeTo(out);
}
}
Expand Down

0 comments on commit 180db5c

Please sign in to comment.