ChenSammi opened a new pull request, #12027:
URL: https://github.com/apache/ozone/pull/12027
## What changes were proposed in this pull request?
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.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17782
## How was this patch tested?
new unit test
--
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]