ChenSammi commented on pull request #2377: URL: https://github.com/apache/ozone/pull/2377#issuecomment-871849982
> > > These changes make sense to me, I have pointed out a couple of small things to check inline. > > Another scenario for this problem is: > > 1. Replication Manager schedules a lot of replication commands on a host where they are queued. > > 2. The host is then decommissioned soon after. > > > In that case, all those inflight replications are still going to be executed. > > Should we also check the DN state in the DN replication command handler, and if the DN is not IN_SERVICE, ignore them? > > You can get the DN state inside `ReplicateContainerCommandHander` via: > > ``` > context.getParent().getDatanodeDetails().getPersistedOpState() > ``` > > So if we passed the context.getParent() into `new ReplicationTask(...)` it would be able to make that check when it is executed. Right. I have added the DN state check in ReplicateContainerCommandHandler#handle. -- 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]
