SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
delete chunks in the last step
Chris Lu9f1e0aeef589
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.goindex 578c400142..645051821c 100644--- a/weed/filesys/dir.go+++ b/weed/filesys/dir.go@@ -317,8 +317,8 @@ func (dir *Dir) removeOneFile(req *fuse.RemoveRequest) error {return nil}- dir.wfs.deleteFileChunks(entry.Chunks)+ // first, ensure the filer store can correctly deleteglog.V(3).Infof("remove file: %v", req)err = filer_pb.Remove(dir.wfs, dir.FullPath(), req.Name, false, false, false, false)if err != nil {@@ -326,9 +326,13 @@ func (dir *Dir) removeOneFile(req *fuse.RemoveRequest) error {return fuse.ENOENT}+ // then, delete meta cache and fsNode cachedir.wfs.metaCache.DeleteEntry(context.Background(), filePath)dir.wfs.fsNodeCache.DeleteFsNode(filePath)+ // delete the chunks last+ dir.wfs.deleteFileChunks(entry.Chunks)+return nil}