diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-06-06 22:55:59 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-06-06 22:55:59 -0700 |
| commit | e755540be9db040272c35b511bc4a1fe41e4f0a6 (patch) | |
| tree | 05c6581ccc5b45d75e33f5e76cb5aa166cfef207 | |
| parent | daabdfe35752cbe3723a5b673c1eb2bcc62ecdbc (diff) | |
| download | seaweedfs-e755540be9db040272c35b511bc4a1fe41e4f0a6.tar.xz seaweedfs-e755540be9db040272c35b511bc4a1fe41e4f0a6.zip | |
fix caching during directory listing
| -rw-r--r-- | weed/filesys/dir.go | 6 | ||||
| -rw-r--r-- | weed/filesys/file.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 580947d6e..c55776a3d 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 nil diff --git a/weed/filesys/file.go b/weed/filesys/file.go index ec98d4d25..95f478a76 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.Chunks file.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 { |
