AllowEmptyFolder checks during S3 object deletion

chrislu committed 2024-04-29 06:26:23 -07:00
1 parent c635d26df1
commit 2dcf09eaf9
1 file changed
+1 -5
+1 -5
@@ -83,11 +83,7 @@ Not included:
SeaweedFS has directories while AWS S3 only has objects with "fake" directories. In AWS S3, if the last file is deleted in a directory, the directory will disappear also.
To be consistent with AWS S3, SeaweedFS tries to skip empty folders while listing. You can use `weed s3 -allowEmptyFolder` to toggle this behavior.
This is not so ideal. Another approach is to list current directory when deleting a file, which will slow down quite a bit especially when deleting multiple files. SeaweedFS did not take this approach.
The last approach, which is most efficient, is to maintain counters for each folder, and drop the folder as soon as it becomes empty. This is implemented in [[Cloud Monitoring]].
To be consistent with AWS S3, SeaweedFS tries to check whether the folder is empty after each deletion. You can use `weed s3 -allowEmptyFolder` to toggle this behavior.
# S3 Authentication