xBis7 commented on code in PR #5726:
URL: https://github.com/apache/ozone/pull/5726#discussion_r1431617961


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/SCMCommonPlacementPolicy.java:
##########
@@ -445,6 +445,7 @@ public ContainerPlacementStatus validateContainerPlacement(
       }
     }
     List<Integer> currentRackCount = new ArrayList<>(dns.stream()
+        .filter(d -> !(d.isDecommissioned()))

Review Comment:
   @sodonnel Since we are allowing over-replication, Should we also extend the 
check in `ContainerPlacementStatusDefault#isPolicySatisfied()` to something 
like this
   
   ```java
   cnt <= maxReplicasPerRack && maxReplicasPerRack - cnt <= 1);
   ```
   so that we can report mis-replication if there is too much uneven 
distribution.
   
   In the above example, 
   
   > I think that one reason the max-per-rack was brought it, was for EC + Rack 
Scatter. Say you have 3 racks and EC 3-2. The idea distribution is 2, 2, 1. 
However 3, 1, 1 is also possible,
   
   3, 1, 1 won't be reported as mis-replication with the new code addition. But 
if we check that the replica difference between racks isn't more than 1, we can 
identify such cases.
   
   What do you think? This check might make sense only for EC containers.



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