Support for Heap after GC stats (correction after backport to 1.2.0) (#1315)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
Andriy Redko 2021-09-30 09:48:24 -04:00 committed by GitHub
parent 80388a8a29
commit 180db5cd09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -500,7 +500,7 @@ public class JvmStats implements Writeable, ToXContentFragment {
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);
@ -514,7 +514,7 @@ public class JvmStats implements Writeable, ToXContentFragment {
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);
}
}