Skip to content

Commit

Permalink
Changed ClusterStatsNodes.ProcessStats stream serialization logic to …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
bleskes committed Jan 10, 2014
1 parent 357a1f6 commit 0c3249f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ public void readFrom(StreamInput in) throws IOException {
cpuPercent = in.readVInt();
totalOpenFileDescriptors = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_0_90_10)) {
minOpenFileDescriptors = in.readVLong();
maxOpenFileDescriptors = in.readVLong();
minOpenFileDescriptors = in.readLong();
maxOpenFileDescriptors = in.readLong();
}
}

Expand All @@ -460,8 +460,8 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(cpuPercent);
out.writeVLong(totalOpenFileDescriptors);
if (out.getVersion().onOrAfter(Version.V_0_90_10)) {
out.writeVLong(minOpenFileDescriptors);
out.writeVLong(maxOpenFileDescriptors);
out.writeLong(minOpenFileDescriptors);
out.writeLong(maxOpenFileDescriptors);
}
}

Expand Down

0 comments on commit 0c3249f

Please sign in to comment.