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
fix caching during directory listing
Chris Lue755540be9db
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.goindex 580947d6e2..c55776a3d2 100644--- a/weed/filesys/dir.go+++ b/weed/filesys/dir.go@@ -57,10 +57,10 @@ func (dir *Dir) Attr(context context.Context, attr *fuse.Attr) error {ParentDir: parent,}- glog.V(1).Infof("read dir attr: %v", request)+ glog.V(1).Infof("read dir %s attr: %v", dir.Path, request)resp, err := client.GetEntryAttributes(context, request)if err != nil {- glog.V(0).Infof("read dir attr %v: %v", request, err)+ glog.V(0).Infof("read dir %s attr %v: %v", dir.Path, request, err)return err}@@ -226,8 +226,8 @@ func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error) {} else {dirent := fuse.Dirent{Name: entry.Name, Type: fuse.DT_File}ret = append(ret, dirent)- dir.wfs.listDirectoryEntriesCache.Set(dir.Path+"/"+entry.Name, entry, 300*time.Millisecond)}+ dir.wfs.listDirectoryEntriesCache.Set(dir.Path+"/"+entry.Name, entry, 300*time.Millisecond)}return nildiff --git a/weed/filesys/file.go b/weed/filesys/file.goindex ec98d4d253..95f478a769 100644--- a/weed/filesys/file.go+++ b/weed/filesys/file.go@@ -38,7 +38,7 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error {entry := item.Value().(*filer_pb.Entry)file.Chunks = entry.Chunksfile.attributes = entry.Attributes- glog.V(1).Infof("file attr read cached %v attributes", file.Name)+ // glog.V(1).Infof("file attr read cached %v attributes", file.Name)} else {err := file.wfs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error {