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 2021/10/26 05:32:39 UTC

[GitHub] [ozone] rakeshadr commented on a change in pull request #2757: HDDS-5820. Intermittent failure in TestPipelinePlacementPolicy#testPickLowestLoadAnchor

rakeshadr commented on a change in pull request #2757:
URL: https://github.com/apache/ozone/pull/2757#discussion_r736165095



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelinePlacementPolicy.java
##########
@@ -376,8 +378,7 @@ public DatanodeDetails chooseNode(final List<DatanodeDetails> healthyNodes) {
     if (healthyNodes == null || healthyNodes.isEmpty()) {
       return null;
     }
-    DatanodeDetails selectedNode =
-            healthyNodes.get(getRand().nextInt(healthyNodes.size()));
+    DatanodeDetails selectedNode = healthyNodes.get(0);

Review comment:
       @sky76093016 Thanks for the detailed analysis. I'm wondering why the existing `getRand().next(healthyNodes.size()` was not generated sufficient randomness ?




-- 
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