xBis7 commented on code in PR #5726:
URL: https://github.com/apache/ozone/pull/5726#discussion_r1425775267
##########
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:
> Again here, I wonder about maintenance replicas. It would be possible for
there to be extra copies of maintenance replicas in the cluster, like with
decommission, and until the node goes offline, there would be too many replicas.
Are you saying that we should occasionally filter maintenance replicas as
well? We skip them, since we expect a maintenance node to not be stopped.
> But as the container is effectively over-replicated, we have to adjust the
max nodes per rack upwards by the delta between the actual replica count and
expected replicas.
>
> So if we add to that max per rack Math.max(0, dns.size() - replicas) = 1,
then we get 3 allowed per rack, which means the policy would not be violated
any more.
I don't understand this part, can you explain it more? Where can I find it
in the code?
In your example, `(3xin_service 1xdecommissioning)` the container isn't
over-replicated for SCM. The replica on the decommissioned node isn't counted.
But the placement policy will say that the container is mis-replicated. As long
as the SCM considers the container properly replicated, it makes sense to me to
filter any replicas on offline nodes, in the policy as well.
--
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]