umamaheswararao commented on code in PR #3645:
URL: https://github.com/apache/ozone/pull/3645#discussion_r950456081


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -186,28 +209,30 @@ public Map<DatanodeDetails, SCMCommand<?>> 
processAndCreateCommands(
       if (decomIndexes.size() > 0) {
         final List<DatanodeDetails> selectedDatanodes =
             getTargetDatanodes(excludedNodes, container, decomIndexes.size());
-        excludedNodes.addAll(selectedDatanodes);
-        Iterator<DatanodeDetails> iterator = selectedDatanodes.iterator();
-        // In this case we need to do one to one copy.
-        for (ContainerReplica replica : replicas) {
-          if (decomIndexes.contains(replica.getReplicaIndex())) {
-            if (!iterator.hasNext()) {
-              LOG.warn("Couldn't find enough targets. Available source"
-                  + " nodes: {}, the target nodes: {}, excluded nodes: {} and"
-                  + "  the decommission indexes: {}",
-                  replicas, selectedDatanodes, excludedNodes, decomIndexes);
-              break;
+        if (validatePlacement(nodes, selectedDatanodes)) {

Review Comment:
   Here nodes contains decom nodes as well? If we should we check excluding 
decom index nodes?



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

Reply via email to