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: [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]