JacksonYao287 commented on PR #3384:
URL: https://github.com/apache/ozone/pull/3384#issuecomment-1126613413

   @sodonnel  thanks for the comments!
   one aim of this patch is changing the current Replication Manager to what it 
should look like, and sketching the architecture, so that we can be clear about 
what kind of modules it will have , and we can start working on them 
independently. I do not refine any part and just move the code to the module it 
should belong, since i think we should create separate jira  for any refination 
of any module, so that it will be easy to review and test.
   
   >Rather than the ReplicationManager removing the completed and expired 
replications, we could have a standalone PendingContainerOps monitor, that 
works as follows:
   
   >Replication Manager adds pending replications and deletes to it.
   >Replication Manager queries it for anything pending for the current 
container and gets a list of PendingActions back.
   >The PendingReplicationMonitor has its own internal thread that checks for 
expired replications and removes them.
   >Completed replications and deletes are removed in ComtainerManagerImpl, 
which has updateContainerReplica and >removeContainerReplica triggered via the 
container reports (ICR and FCR) from the datanodes as they are replicated.
   
   this is a good idea , and it used to come to my mind also. the 
inflightActions should be removed by ContainerReportHandler through 
InflightActionManager as soon as possible when receiving ICR or FCR. but 
whatever, the main idea is we should have a standalone class to manage all the 
inflightActions, be responsible to add and delete inflight actions, and any 
other class should query inflight action through this manager(or monitor) . we 
can add a internal thread in InflightActionManager(or some other name) to check 
the expired replications and removes them. but this seems a refination work, 
and we can create a separate jira to solve. if we put all refactor and refine 
work into a single jira , seems a little complex for review and test.
   
   >I will have a go at creating the outline of what I described above and see 
how it looks.
   sure, please go ahead, looking forward to see it. or if you have any other 
ideal , we can discuss through slack
   


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