mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
* filer: refuse a non-recursive delete of a bucket that has children A non-recursive delete of a folder that has children fails with ErrNonEmptyFolder: doBatchDeleteFolderMetaAndData lists the folder's first page and refuses. For a bucket on a store that keeps each bucket apart (leveldb3, the SQL stores with bucket tables, ArangoDB, YDB with bucket tables), it skipped that listing, because such a store drops a deleted bucket's children in one call and a recursive delete needs no walk. The non-recursive delete then went through: DeleteFolderChildren dropped the bucket's objects, the bucket entry was deleted, and DeleteEntryMetaAndData deleted the bucket's collection, so the objects' volumes went with them. rmdir on a weed mount, fs.rm without -r and a filer HTTP DELETE without recursive=true each send such a delete. On the other stores the same request is refused. A non-recursive delete now lists a bucket on these stores the way it lists any other folder, and is refused when the bucket has children. An empty bucket is still dropped by the store, which frees what the store keeps per bucket, and a recursive delete still drops a bucket without a walk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer: say why a non-recursive bucket delete still sweeps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>