HDFS-17035. FsVolumeImpl#getActualNonDfsUsed may return negative value. (#5708). Contributed by farmmamba.

Reviewed-by: Shuyan Zhang <zqingchai@gmail.com>
Reviewed-by: He Xiaoqiao <hexiaoqiao@apache.org>
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
hfutatzhanghb 2023-06-08 16:58:01 +08:00 committed by GitHub
parent 0c209961f8
commit ddae78b0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -499,7 +499,7 @@ public class FsVolumeImpl implements FsVolumeSpi {
return used;
}
}
return getDfUsed() - getDfsUsed();
return Math.max(getDfUsed() - getDfsUsed(), 0L);
}
/**