[
https://issues.apache.org/jira/browse/HDDS-15654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sreeja updated HDDS-15654:
--------------------------
Description:
In ContainerBalancerTask, withinThresholdUtilizedNodes list is populated in
initializeIteration() but never used for source/target selection, since
getPotentialSources() / getPotentialTargets() only return over/under nodes.
There are TODOs to include within threshold nodes as candidates, but that was
never implemented.
Using within threshold nodes as balancing candidates is not needed as the
balancer's threshold configuration already controls participation. If a within
threshold node should participate, operators can tighten the threshold to
reclassify it as over- or under utilized.
Fix: Remove withinThresholdUtilizedNodes list and the related TODOs. No change
to current balancer behavior.
was:
{code:java}
private void resetState() {
moveManager.resetState();
this.overUtilizedNodes.clear();
this.underUtilizedNodes.clear(); // cleared
// withinThresholdUtilizedNodes.clear() ← MISSING
this.containerToSourceMap.clear(); {code}
Each call to {{initializeIteration()}} adds new nodes to
{{withinThresholdUtilizedNodes}} without ever removing stale ones. If a node
moves from "within threshold" to "over/under" in a later iteration, it remains
in {{withinThresholdUtilizedNodes}} from the previous iteration.
> withinThresholdUtilizedNodes never cleared between iterations
> --------------------------------------------------------------
>
> Key: HDDS-15654
> URL: https://issues.apache.org/jira/browse/HDDS-15654
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Ashish Kumar
> Assignee: Sreeja
> Priority: Major
> Labels: container-balancer
>
> In ContainerBalancerTask, withinThresholdUtilizedNodes list is populated in
> initializeIteration() but never used for source/target selection, since
> getPotentialSources() / getPotentialTargets() only return over/under nodes.
> There are TODOs to include within threshold nodes as candidates, but that was
> never implemented.
> Using within threshold nodes as balancing candidates is not needed as the
> balancer's threshold configuration already controls participation. If a
> within threshold node should participate, operators can tighten the threshold
> to reclassify it as over- or under utilized.
> Fix: Remove withinThresholdUtilizedNodes list and the related TODOs. No
> change to current balancer behavior.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]