[ 
https://issues.apache.org/jira/browse/HDDS-17782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-17782:
----------------------------------
    Labels: pull-request-available  (was: )

> Race condition between empty expired directory and new key created under the 
> directory
> --------------------------------------------------------------------------------------
>
>                 Key: HDDS-17782
>                 URL: https://issues.apache.org/jira/browse/HDDS-17782
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Sammi Chen
>            Assignee: Sammi Chen
>            Priority: Major
>              Labels: pull-request-available
>
> In the current Lifecycle task implementation, once a directory is expired and 
> empty, it will be send to OM for deletion through DeleteKeys command and 
> OmKeysDeleteRequestWithFSO. OmKeysDeleteRequestWithFSO will check if 
> directory's updateID is changed to see if there is any updates on this 
> directory. If yes, then this directory will not be deleted, otherwise it will 
> be deleted. 
> The problem is when there is a new key/sub directory created under it, 
> neither it's updateID nor it's modification time will be updated. So if a a 
> new key/sub directory created under it, the OmKeysDeleteRequestWithFSO 
> doesn't check whether the directory is empty, it will delete the directory 
> anyway, which will delete the new key/subDir mistakenly. 
>  
> This task aims to solve this problem. Instead of adding the directory empty 
> check in the OmKeysDeleteRequestWithFSO, we switch to use 
> OmKeyDeleteRequestWithFSO instead. Two reasons, one is I don't want the 
> OmKeysDeleteRequestWithFSO execution time become longer as it has the bucket 
> write lock and will block all other OM RPCs, second is moderate speed 
> deletion for Lifecycle service is an ideal state, we don't want the deletion 
> happen too fast. 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to