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

   > Yea, it is going to be tricky to fix this in Recon, without duplicating 
much of the logic in SCM for this scenario.
   
   I was looking into that, but right now I think the best solution would be to 
reuse the `RatisContainerReplicaCount` class from SCM and let Recon get 
`under-replication` or `over-replication` from there.
   
   For example, `ContainerHealthStatus#isOverReplicated()`
   
   ```diff
     public boolean isOverReplicated() {
   -    return replicaDelta < 0;
   +    return ratisContainerReplicaCount.isOverReplicated();
     }
   
   ```
   
   No pending replica operations will be considered for Recon but it will be 
almost in sync with the SCM and any SCM changes for calculating 
`over-replication` or `under-replication` will be carried over to Recon without 
further changes. 
   
   @sodonnel What do you think? 


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