djordje-mijatovic commented on code in PR #4207:
URL: https://github.com/apache/ozone/pull/4207#discussion_r1086610934
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/LegacyReplicationManager.java:
##########
@@ -1612,6 +1613,20 @@ private boolean isOpenContainerHealthy(
.allMatch(r -> compareState(state, r.getState()));
}
+ private void setHealthStateForClosing(Set<ContainerReplica> replicas,
+ ContainerInfo container,
+ ReplicationManagerReport report) {
+ if (!replicas.stream().
+ anyMatch(r -> compareState(LifeCycleState.OPEN, r.getState()) ||
+ compareState(LifeCycleState.CLOSED, r.getState()))) {
+ report.incrementAndSample(HealthState.MISSING, container.containerID());
Review Comment:
It is not enough. For example, lets say we have 6 data nodes and replication
factor 3. Container 1 can be stored on data nodes 1, 2 and 4, for example. If
all 3 data nodes (data nodes 1, 2 and 4) go offline at the same moment, than
the container 1 will be in CLOSING state and will have 2 replicas also in
CLOSING state but it will still be MISSING.
I am new on this project, so I might be wrong.
--
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]