You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2025/12/15 09:15:00 UTC
[jira] [Updated] (HDDS-14175) DefaultVolumeChoosingPolicy should not call getCurrentUsage() multiple times
[ https://issues.apache.org/jira/browse/HDDS-14175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz-wo Sze updated HDDS-14175:
------------------------------
Description:
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.
was: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.
> DefaultVolumeChoosingPolicy 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
>
> 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org