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
update cache if updating the attributes
Chris Lude3eb7c3801e
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.goindex 35ee09f2d2..9f23a1132d 100644--- a/weed/filesys/dir.go+++ b/weed/filesys/dir.go@@ -337,6 +337,8 @@ func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fusdir.attributes.Mtime = req.Mtime.Unix()}+ dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)+parentDir, name := filer2.FullPath(dir.Path).DirAndName()return dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {@@ -355,8 +357,6 @@ func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fusreturn fuse.EIO}- dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)-return nil})diff --git a/weed/filesys/file.go b/weed/filesys/file.goindex 0a0090e3d2..2d4be3c801 100644--- a/weed/filesys/file.go+++ b/weed/filesys/file.go@@ -111,6 +111,8 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *freturn nil}+ file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())+return file.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {request := &filer_pb.UpdateEntryRequest{