siddhantsangwan opened a new pull request, #5218:
URL: https://github.com/apache/ozone/pull/5218

   ## What changes were proposed in this pull request?
   
   UNHEALTHY replicas are considered when checking for mis replication in 
`ECReplicationCheckHandler`, but not when checking for under/over replication.
   When this mis replicated container is picked from queue, mis replication 
handling isn't correct because that assumes the container is not over/under 
replicated.
   
   The solution here is to take care of the excess UNHEALTHY replica before 
checking for mis replication. This PR splits the mis replication check from 
`ECReplicationCheckHandler` into its own handler. This new handler, called 
`ECMisReplicationCheckHandler`, is added to the command chain after the 
unhealthy handler. This means any excess UNHEALTHY replicas will be removed (or 
at least scheduled for delete) first. Then mis replication will be checked in 
this new handler in the next iteration. The UNHEALTHY replica might have been 
deleted by then, or will have a delete scheduled. The new mis replication 
handler will consider this when checking for mis replication and queue the 
container if required.
   
   Changes:
   1. The code for checking mis replication has mostly been copied over into 
the new handler from the old one. 
   2. The old tests have been copied over and some new tests have been added 
into `TestECMisReplicationCheckHandler`.
   3. New tests in `TestReplicationManager`.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9177
   
   ## How was this patch tested?
   
   Existing + new unit tests. Also did manual testing in the `ozone-topology` 
docker env.


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