Currently, deleting objects and metadata are not synchronized - so checking that a directory is empty before deleting may not always be correct. Since it is also difficult to lock the file system to coordinate deletion of empty directories, it is better not to when calling delete_object or delete_metadata.
Refactor the affected methods and code to only delete the object/metadata, and not the parent directories.
Currently, deleting objects and metadata are not synchronized - so checking that a directory is empty before deleting may not always be correct. Since it is also difficult to lock the file system to coordinate deletion of empty directories, it is better not to when calling
delete_object
ordelete_metadata
.Refactor the affected methods and code to only delete the object/metadata, and not the parent directories.