xBis7 commented on code in PR #5651:
URL: https://github.com/apache/ozone/pull/5651#discussion_r1407450174
##########
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:
I didn't realize that It's different for MAINTENANCE. The case in the above
comment is for DECOMMISSIONING. For MAINTENANCE, no copy is made.
On master, Recon doesn't show an error neither before nor after the datanode
is stopped.
With this patch, Recon shows the container as under-replicated while it's in
maintenance and continues to do so after the datanode is stopped.
--
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]