[ 
https://issues.apache.org/jira/browse/HDDS-13599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18016819#comment-18016819
 ] 

Tsz-wo Sze commented on HDDS-13599:
-----------------------------------

# Thread A read – got a FileChannel opened with the old path
 # Thread B move – moved the old path to the new path
 # Thread C read – got a FileChannel opened with the new path

For read/write, "resolve" and "open" are synchronized so they become atomic.

For move, "update resolver" and "delete" should be synchronized. If deleting a 
container directory takes a long time while holding the lock, we could change 
"delete" to "move to tmp and delete tmp". Then, "update resolver" and "move to 
tmp" should be synchronized but the "delete tmp" is not.

> Take write Lock of all block files before a container replica directory is 
> deleted
> ----------------------------------------------------------------------------------
>
>                 Key: HDDS-13599
>                 URL: https://issues.apache.org/jira/browse/HDDS-13599
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Sammi Chen
>            Priority: Major
>         Attachments: screenshot-1.png
>
>
> To avoid interim read failure caused by block file deleted during container 
> replica directory deletion. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to