You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/10/19 20:56:32 UTC

[GitHub] [ozone] aswinshakil commented on a diff in pull request #3847: HDDS-3419. Throw exception with correct code when healthy nodes are not sufficient

aswinshakil commented on code in PR #3847:
URL: https://github.com/apache/ozone/pull/3847#discussion_r999926450


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java:
##########
@@ -124,6 +124,15 @@ List<DatanodeDetails> filterViableNodes(
     // get nodes in HEALTHY state
     List<DatanodeDetails> healthyNodes =
         nodeManager.getNodes(NodeStatus.inServiceHealthy());
+    if (healthyNodes.size() < nodesRequired) {

Review Comment:
   I don't think this assertion was the issue previously, 
   https://github.com/apache/ozone/blob/4454e6b368bc5aedaba509eeb85422daeda393bf/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestRatisPipelineCreateAndDestroy.java#L148
   This issue was created long back, I think it was fixed by subsequent code changes over the year. 
   
   Even without adding this change, it would have thrown an exception as `nodesWithSpace` is a subset of `healthyNodes`. So I don't think we need to be checking it again. As for the test change I did this,
   
   > 1. changing expected code to FAILED_TO_FIND_NODES_WITH_SPACE in test
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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