[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to