xBis7 commented on PR #5651:
URL: https://github.com/apache/ozone/pull/5651#issuecomment-1843586540

   While trying to make Recon consistent with the SCM, I ended up duplicating 
the code. I've updated `ContainerHealthStatus` to use 
`RatisContainerReplicaCount` for calculating over-replication or 
under-replication. This is the same class making these calculations in the SCM. 
With this approach, every change in how the SCM checks for over or under 
replication will be carried over to Recon without further modifications. 
   
   I've also made a few other small changes to eliminate discrepancies with the 
SCM. For example, a container is missing when it has 0 replicas in the system, 
regardless of healthy or unhealthy replicas. Recon was marking a container as 
missing if it had 0 `healthy` replicas.
   
   I've updated the existing tests and they are passing and I've also added new 
unit tests. I've also got a couple green CIs on my fork, so there isn't 
anything broken with these changes.
   
   This approach is more extensive than the original one but it ensures that 
Recon stays in sync with SCM. @devmadhuu @sumitagrawl @sodonnel @adoroszlai Can 
you please take a look?  
   
   There could be a follow up PR for making more methods in 
`ContainerHealthStatus` call their equivalents from 
`RatisContainerReplicaCount` and cleaning up the tests.


-- 
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]

Reply via email to