From 2dcf09eaf96fc4724ba0d80b3898d0df13798010 Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 29 Apr 2024 06:26:23 -0700 Subject: [PATCH] AllowEmptyFolder checks during S3 object deletion --- Amazon-S3-API.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Amazon-S3-API.md b/Amazon-S3-API.md index 473be3a..3520bff 100644 --- a/Amazon-S3-API.md +++ b/Amazon-S3-API.md @@ -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