Skip to content

Conversation

@Gargi-jais11
Copy link
Contributor

What changes were proposed in this pull request?

Sorting based on density is ok to choose source and possible destination, but the logic of choosing destination here can not be direct reverse loop, and need care for choosing destination should be make that node as candidate for reverse movement. And if no destination is possible to choose, should mark disk as balanced.
This reverse looping is especially seen in case of very low threshold such that the volume utilisation of source and destination disk is close making diskbalancer running forever without doing actual balancing.

As a solution to this while choosing container from source volume, we can check if movement of this container should satisfy the below condition.

if (newDestUtilization <= (average utilization + threshold)) {
// container move is productive
    return containerData;
}    

What is the link to the Apache JIRA

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

How was this patch tested?

Added new UT TestDefaultContainerChoosingPolicy.

@Gargi-jais11 Gargi-jais11 marked this pull request as ready for review September 26, 2025 11:39
@Gargi-jais11
Copy link
Contributor Author

@ChenSammi could you please review the changes? Thank you.

Gargi Jaiswal added 4 commits October 13, 2025 14:20
@ChenSammi
Copy link
Contributor

The last patch looks good to me +1. Wait for the CI to pass.

@ChenSammi ChenSammi merged commit 6f43e7c into apache:HDDS-5713 Oct 16, 2025
43 checks passed
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.

2 participants