You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/04/22 09:17:00 UTC

[jira] [Updated] (HDDS-6630) Remove chosen nodes in PlacementPolicy.getResultSet

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

ASF GitHub Bot updated HDDS-6630:
---------------------------------
    Labels: pull-request-available  (was: )

> Remove chosen nodes in PlacementPolicy.getResultSet
> ---------------------------------------------------
>
>                 Key: HDDS-6630
>                 URL: https://issues.apache.org/jira/browse/HDDS-6630
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Janus Chow
>            Assignee: Janus Chow
>            Priority: Major
>              Labels: pull-request-available
>
> In `SCMCommonPlacementPolicy.getResultSet()`, the abstract method of "chooseNode" will be invoked each time to get a valid node, the method declarition is as follows:
> {code:java}
> /**
>  * Choose a datanode according to the policy, this function is implemented
>  * by the actual policy class.
>  *
>  * @param healthyNodes - Set of healthy nodes we can choose from.
>  * @return DatanodeDetails
>  */
> public abstract DatanodeDetails chooseNode(
>     List<DatanodeDetails> healthyNodes); {code}
> For this method, all current implementations of subclasses will remove the chosen node from healthyNodes, but seems this side effect is not explicitly clarified. 
> For users trying to implement their own subclasses, they might forget this removal, which might return incorrect values.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org