Skip to content

HDDS-15310. [DiskBalancer] Fix Threshold range in negative#10308

Open
Gargi-jais11 wants to merge 2 commits into
apache:masterfrom
Gargi-jais11:HDDS-15310
Open

HDDS-15310. [DiskBalancer] Fix Threshold range in negative#10308
Gargi-jais11 wants to merge 2 commits into
apache:masterfrom
Gargi-jais11:HDDS-15310

Conversation

@Gargi-jais11
Copy link
Copy Markdown
Contributor

@Gargi-jais11 Gargi-jais11 commented May 19, 2026

What changes were proposed in this pull request?

ThresholdRange lower side value is shown in negative.
ThresholdRange upper bound can also go beyond 100% when idealUsage of a DN is across 85% to 95%.
A trivial issue as it cannot be less than 0.

Datanode: datanode1.com (10.82.238.73:19864)
Aggregate VolumeDataDensity: 0.1408700123786014
IdealUsage: 0.08426521 | Threshold: 10.0% | ThresholdRange: (-0.01573479, 0.18426521)

Volume Details:

StorageID                                     StoragePath                                TotalCapacity       UsedSpace   Container Pre-AllocatedSpace   EffectiveUsedSpace     Utilization   VolumeDensity
DS-f543b851-ec6a-4229-a95d-68e60b5a12b9       /hadoop-ozone/datanode/data/hdds               349.27 GB         6.07 MB                            0 B             47.10 GB      0.13486543      0.05060022
DS-d3b3f53f-02c8-4982-80c9-7d1cce2a484d       /data0/nvme1n1/hadoop-ozone/datanode/data/hdds       195.78 GB         6.11 MB                            0 B             10.64 GB      0.05436899      0.02989622
DS-2ec41da1-a185-42e1-8b33-88de998c6fd1       /data0/nvme3n1/hadoop-ozone/datanode/data/hdds       195.78 GB         6.12 MB                            0 B             10.96 GB      0.05597013      0.02829508
DS-a4e9901e-e856-4660-bd3f-db695f3648c4       /data0/nvme2n1/hadoop-ozone/datanode/data/hdds       195.78 GB         6.11 MB                            0 B             10.22 GB      0.05218671      0.03207850
 

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15310

How was this patch tested?

Added unit test and tested manually.
After Fix:

bash-5.1$ ozone admin datanode diskbalancer report --in-service-datanodes
Report result:
Datanode: ozone-datanode-1.ozone_default (172.18.0.2:19864)
Aggregate VolumeDataDensity: 0.0024470187365063373
IdealUsage: 0.09599255 | Threshold: 10.0% | ThresholdRange: (0.00000000, 0.19599255)

Volume Details:

StorageID                                     StoragePath                                TotalCapacity       UsedSpace   Container Pre-AllocatedSpace   EffectiveUsedSpace     Utilization   VolumeDensity
DS-b7280aed-120a-40f7-b673-911fe5c7c061       /data/hdds1/hdds                              1006.75 GB         1.81 GB                            0 B             96.02 GB      0.09538079      0.00061175
DS-bc7b4a02-c4dd-4dd2-aa7c-e41612a9d92b       /data/hdds2/hdds                              1006.75 GB         1.16 GB                        1.85 GB             97.87 GB      0.09721606      0.00122351
DS-f26b66b9-a0b6-4661-a831-d65c3e1801fd       /data/hdds3/hdds                              1006.75 GB         3.61 GB                            0 B             96.02 GB      0.09538079      0.00061175

bash-5.1$ ozone admin datanode diskbalancer report --in-service-datanodes
Report result:
Datanode: ozone-datanode-1.ozone_default (172.18.0.2:19864)
Aggregate VolumeDataDensity: 5.4470187365063373
IdealUsage: 0.85992550 | Threshold: 20.0% | ThresholdRange: (0.65992550, 0.10000000)

@Gargi-jais11 Gargi-jais11 requested review from ChenSammi and ssulav May 19, 2026 07:51
@Gargi-jais11 Gargi-jais11 changed the title Hdds 15310. [DiskBalancer] Fix Threshold range in negative HDDS-15310. [DiskBalancer] Fix Threshold range in negative May 19, 2026
@Gargi-jais11 Gargi-jais11 marked this pull request as ready for review May 19, 2026 08:32
@ChenSammi ChenSammi requested a review from Copilot May 19, 2026 10:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants