ashishkumar50 commented on code in PR #5362:
URL: https://github.com/apache/ozone/pull/5362#discussion_r1344254747
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java:
##########
@@ -561,7 +561,7 @@ private List<DatanodeDetails>
chooseNodes(List<DatanodeDetails> excludedNodes,
DatanodeDetails favoredNode = favoredNodeNum > favorIndex ?
favoredNodes.get(favorIndex) : null;
DatanodeDetails chosenNode;
- if (favoredNode != null && networkTopology.isSameParent(
+ if (favoredNode != null && !networkTopology.isSameParent(
Review Comment:
@swamirishi Thanks for the review.
UsedNodes are already added into
[excludedNodes](https://github.com/apache/ozone/blob/b3c84845926fb79e4b3b4ae20ded2be1c97ada06/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackAware.java#L227)
in the caller. And nodes here we are choosing in different rack than excluded
nodes. So it's considering usedNodes as well here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]