You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2022/05/13 15:17:00 UTC

[jira] [Resolved] (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 ]

Attila Doroszlai resolved HDDS-6630.
------------------------------------
    Fix Version/s: 1.3.0
       Resolution: Implemented

> 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
>             Fix For: 1.3.0
>
>
> 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