sodonnel commented on code in PR #4399:
URL: https://github.com/apache/ozone/pull/4399#discussion_r1138337363


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/RatisOverReplicationHandler.java:
##########
@@ -277,17 +282,18 @@ private Set<Pair<DatanodeDetails, SCMCommand<?>>> 
createCommands(
     // iterate through replicas in deterministic order
     for (ContainerReplica replica : replicas) {
       if (excess == 0) {
-        return commands;
+        return commandsSent;
       }
 
       if (super.isPlacementStatusActuallyEqualAfterRemove(replicaSet, replica,
           containerInfo.getReplicationFactor().getNumber())) {
-        commands.add(Pair.of(replica.getDatanodeDetails(),
-            createDeleteCommand(containerInfo)));
+        replicationManager.sendDeleteCommand(containerInfo,
+            replica.getReplicaIndex(), replica.getDatanodeDetails(), true);
+        commandsSent++;
         excess--;
       }
     }
-    return commands;
+    return commandsSent;
   }
 
   private DeleteContainerCommand createDeleteCommand(ContainerInfo container) {

Review Comment:
   I missed that, thanks. Removed it now.



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