Skip to content

Commit ee87b4c

Browse files
committed
Changed ClusterStatsNodes.ProcessStats stream serialization logic to use readLong instead of readVLong for file descriptors
The minOpenFileDescriptors/maxOpenFileDescriptors can be negative valued if the ClusterStatsNodes response was initialized with no nodes. Relates to elastic#4681
1 parent c66d02d commit ee87b4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodes.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ public void readFrom(StreamInput in) throws IOException {
449449
cpuPercent = in.readVInt();
450450
totalOpenFileDescriptors = in.readVLong();
451451
if (in.getVersion().onOrAfter(Version.V_0_90_10)) {
452-
minOpenFileDescriptors = in.readVLong();
453-
maxOpenFileDescriptors = in.readVLong();
452+
minOpenFileDescriptors = in.readLong();
453+
maxOpenFileDescriptors = in.readLong();
454454
}
455455
}
456456

@@ -460,8 +460,8 @@ public void writeTo(StreamOutput out) throws IOException {
460460
out.writeVInt(cpuPercent);
461461
out.writeVLong(totalOpenFileDescriptors);
462462
if (out.getVersion().onOrAfter(Version.V_0_90_10)) {
463-
out.writeVLong(minOpenFileDescriptors);
464-
out.writeVLong(maxOpenFileDescriptors);
463+
out.writeLong(minOpenFileDescriptors);
464+
out.writeLong(maxOpenFileDescriptors);
465465
}
466466
}
467467

0 commit comments

Comments
 (0)