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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -525,8 +528,18 @@ public Map<DatanodeDetails, SCMCommand<?>> 
processUnderReplicatedContainer(
     List<ContainerReplicaOp> pendingOps =
         containerReplicaPendingOps.getPendingOps(containerID);
     if (result.getContainerInfo().getReplicationType() == EC) {
-      return ecUnderReplicationHandler.processAndCreateCommands(replicas,
-          pendingOps, result, maintenanceRedundancy);
+      if (result.getHealthState()

Review Comment:
   I actually think we should have a single processUnhealthyContainer method, 
and in it, have a switch / IF that caters for EC / Ratis and then Over / Under 
/ Mis replicated. But we should also add some tests for that, to ensure the 
correct handler is called in the correct circumstances. However the way RM is 
currently we would need to change it to inject the handlers, so I think we 
should clean this up in another refactor jira.



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