xBis7 commented on PR #5651: URL: https://github.com/apache/ozone/pull/5651#issuecomment-1910326167
@sumitagrawl Let me explain > But Recon defines all states where we don't have the correct number of replicas as unhealthy, so that the containers can appear in the container-endpoint. Healthy has a different meaning for Recon. Recon recognizes 5 states 1. Over-replication 2. Under-replication 3. Mis-replication 4. Missing 5. Correct number of replicas The comment from the `SCMCommonPlacementPolicy` says that we shouldn't have to worry about over-replication because none of the above states means unhealthy for SCM. This is what an unhealthy container is for SCM, check [here](https://github.com/apache/ozone/blob/master/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ContainerReplicaCount.java#L58-L74). Recon says that if the container is in State 5 then it's healthy and if it's in any other state, I'll present it in the UI. The meaning here is different. If we change it the scope of the changes will grow out of hand. > > So that we can say that a container is properly replicated if it's neither under-replicated nor mis-replicated. > > ok, You mean those container will be part of below category in Recon UI, right? With this change, over-replicated containers won't appear in the UI. This is from master, if an `over-replicated` container is considered healthy, then this check [here](https://github.com/apache/ozone/blob/master/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java#L316-L318) will return and the container will never be added in the unhealthy containers record [here](https://github.com/apache/ozone/blob/master/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java#L323). We need the container to be added in the unhealthy containers record, because it's used for the UI. Check [here](https://github.com/apache/ozone/blob/master/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java#L423) which is where we distinguish over-replication. In that method, it first checks if the container is healthy [here](https://github.com/apache/ozone/blob/master/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java#L429) and then checks for over-replication [here](https://github.com/apache/ozone/blob/master/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java#L475). -- 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]
