You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ssulav (via GitHub)" <gi...@apache.org> on 2026/05/19 10:34:57 UTC
Re: [PR] HDDS-15310. [DiskBalancer] Fix Threshold range in negative [ozone]
ssulav commented on code in PR #10308:
URL: https://github.com/apache/ozone/pull/10308#discussion_r3265596688
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerReportSubcommand.java:
##########
@@ -192,7 +192,7 @@ private Map<String, Object> toJson(DatanodeDiskBalancerInfoProto report) {
&& report.getDiskBalancerConf().hasThreshold()) {
double idealUsage = report.getIdealUsage();
double threshold = report.getDiskBalancerConf().getThreshold();
- double lt = idealUsage - threshold / 100.0;
+ double lt = Math.max(0.0, idealUsage - threshold / 100.0);
double ut = idealUsage + threshold / 100.0;
Review Comment:
Is it possible that upper bound it can go beyond 100%?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org