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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/health/ECReplicationCheckHandler.java:
##########
@@ -149,10 +151,16 @@ public ContainerHealthResult 
checkHealth(ContainerCheckRequest request) {
         dueToDecommission = false;
         remainingRedundancy = repConfig.getParity() - missingIndexes.size();
       }
-      return new ContainerHealthResult.UnderReplicatedHealthResult(
-          container, remainingRedundancy, dueToDecommission,
-          replicaCount.isSufficientlyReplicated(true),
-          replicaCount.isUnrecoverable());
+      ContainerHealthResult.UnderReplicatedHealthResult result =
+          new ContainerHealthResult.UnderReplicatedHealthResult(
+              container, remainingRedundancy, dueToDecommission,
+              replicaCount.isSufficientlyReplicated(true),
+              replicaCount.isUnrecoverable());
+      if (replicaCount.decommissioningOnlyIndexes(true).size() > 0

Review Comment:
   For it to have reached DECOMMISSIONED or IN_MAINTENANCE, then it should have 
made a new copy elsewhere already. The flag it sets here only comes into play 
later and when its an unrecoverable container. If there are that many replicas 
missing, we should have another copy of any decommission / or maintenance 
replicas anyway and if there are not, it would be OK for the system to create 
them. I think its OK for this to consider both decommissioning / 
entering_maintenance and decommissioned / in_mantenance.



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