sodonnel commented on code in PR #5651:
URL: https://github.com/apache/ozone/pull/5651#discussion_r1406497574
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthStatus.java:
##########
@@ -48,8 +48,12 @@ public class ContainerHealthStatus {
int repFactor = container.getReplicationConfig().getRequiredNodes();
this.healthyReplicas = healthyReplicas
.stream()
- .filter(r -> !r.getState()
- .equals((ContainerReplicaProto.State.UNHEALTHY)))
+ // Filter unhealthy replicas and
+ // replicas belonging to out-of-service nodes.
+ .filter(r ->
+ (!r.getDatanodeDetails().isDecommissioned() &&
+ !r.getDatanodeDetails().isMaintenance() &&
Review Comment:
For Recon, what would it display if a node is in maintenance and then
stopped, so there are only 2 replicas online? Will it show 2 available and 3
expected, highlighting it as under replicated, or will it be seen as OK? In
this case, no extra copy will be made on the cluster, so recon will never get
to see 3 replicas.
--
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]