sodonnel opened a new pull request, #3425: URL: https://github.com/apache/ozone/pull/3425
## What changes were proposed in this pull request? The legacy replication manager internally keeps a list of all pending replications and deletes. Each time a container is checked, it check this list and removes any replications that have been completed or expired. Then it gets the list of remaining pending operations to help decide if container is healthy or not. Rather than the ReplicationManager removing the completed and expired replications, we could have a standalone ContainerReplicaPendingOps monitor, that works as follows: 1. Replication Manager adds pending replications and deletes to it. 2. Replication Manager queries it for anything pending for the current container and gets a list of PendingActions back. 3. The ContainerReplicaPendingOps has its own internal thread that checks for expired replications and removes them. 4. Completed replications and deletes are removed in ComtainerManagerImpl, which has add and removeContainer triggered via the container reports (ICR and FCR) from the datanodes as they are replicated. This way, the ReplicationManager does not need to worry about expiring replications or removing completed entries. We also get the ability to have a more up-to-date view of the system, as the ICR / FCRs will keep the pending table up-to-date in real time, rather than having to wait for the container to be re-check inside replication manager. We can have a fairly simple "ContainerReplicaPendingOps" class that is basically standalone and inject it into ReplicationManager and ContainerManagerImpl. This would allow for removing some complexity from RM and let the expiry and completion be tested in an isolated way. This change does not go as far as adding the scheduled thread into ContainerReplicaPendingOps, but that can be done as a followup change. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-6744 ## How was this patch tested? New tests added. -- 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]
