[ 
https://issues.apache.org/jira/browse/HDDS-14175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze updated HDDS-14175:
------------------------------
    Summary: Disk balancer should not call getCurrentUsage() multiple times  
(was: DefaultVolumeChoosingPolicy should not call getCurrentUsage() multiple 
times)

> Disk balancer should not call getCurrentUsage() multiple times
> --------------------------------------------------------------
>
>                 Key: HDDS-14175
>                 URL: https://issues.apache.org/jira/browse/HDDS-14175
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: Ozone Datanode
>            Reporter: Tsz-wo Sze
>            Assignee: Tsz-wo Sze
>            Priority: Major
>              Labels: pull-request-available
>
> In DefaultVolumeChoosingPolicy.chooseVolume(..), getCurrentUsage() is called 
> multiple times so it can return different values.  The biggest problem is the 
> sorted(..) call.  The code calls getCurrentUsage() in the comparator.  The 
> behavior is ill-defined for sorting changing values.
> Another bug is that it has filtered the volumes > threshold first and then 
> choose destVolume.  The destVolume must also be  > threshold, which is 
> undesiable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to