ChenSammi commented on PR #8127:
URL: https://github.com/apache/ozone/pull/8127#issuecomment-2743008869

   > Is this check really needed?
   > 
   > I am not too sure how the disk balancer moves a container, but it should 
take a lock on the container to ensure it is not changed while the container 
contents are being copies to the new disk. That would prevent replication from 
starting, as it must get a lock on the container to export the container data 
too.
   > 
   > Then when the data is copied to the new disk, I assume the disk balancer 
will atomically swap the in memory view of the container from old disk to new 
disk, before removing the data on the old disk.
   > 
   > Due to the locking, if an push replication is in progress, the balancer 
will not be able to lock and will wait, and the opposite is true too - the 
replication would wait on the balance task on the container.
   > 
   > I seems like this should all be handled by the lock on the 
KeyValueContainer instance?
   
   The container which is replicated to other datanode, has the chance to be 
deleted later for reasons such as mis-replicated. So the task is to avoid 
selecting those containers to move at the current iterating, not to avoid the 
contention between two types of work.  


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