[7.x] #32478 fixed cluster stats return 8EB (#32480) (32972311) (#54273)

Co-authored-by: Darby.Han <darby.han@navercorp.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: 한우람 <hgword@gmail.com>
Co-authored-by: Darby.Han <darby.han@navercorp.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Lee Hinman 2020-03-26 09:12:09 -06:00 committed by GitHub
parent 5bfaa20dd4
commit 3e1fc8a5c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -114,6 +114,9 @@ public class FsInfo implements Iterable<FsInfo.Path>, Writeable, ToXContentFragm
}
private long addLong(long current, long other) {
if (current == -1 && other == -1) {
return 0;
}
if (other == -1) {
return current;
}
@ -124,6 +127,9 @@ public class FsInfo implements Iterable<FsInfo.Path>, Writeable, ToXContentFragm
}
private double addDouble(double current, double other) {
if (current == -1 && other == -1) {
return 0;
}
if (other == -1) {
return current;
}