diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-04-21 18:02:08 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-04-21 18:02:08 -0700 |
| commit | b8e4238ad29a60b37a3983a9968e325dd6849103 (patch) | |
| tree | f86c397acbd34c2daf82bbe9fba9b4b4ab8fe69c /weed/filesys/dir.go | |
| parent | 27128c78751990de93459035afb6b9c9bd3ed16c (diff) | |
| download | seaweedfs-b8e4238ad29a60b37a3983a9968e325dd6849103.tar.xz seaweedfs-b8e4238ad29a60b37a3983a9968e325dd6849103.zip | |
add placeholder for cached meta data reading
Diffstat (limited to 'weed/filesys/dir.go')
| -rw-r--r-- | weed/filesys/dir.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 46e8aebb4..ace958e82 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -205,6 +205,10 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse. fullFilePath := util.NewFullPath(dir.FullPath(), req.Name) entry := dir.wfs.cacheGet(fullFilePath) + if dir.wfs.option.AsyncMetaDataCaching { + + } + if entry == nil { // glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath) entry, err = filer_pb.GetEntry(dir.wfs, fullFilePath) @@ -244,6 +248,10 @@ func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error) { glog.V(3).Infof("dir ReadDirAll %s", dir.FullPath()) + if dir.wfs.option.AsyncMetaDataCaching { + + } + cacheTtl := 5 * time.Minute readErr := filer_pb.ReadDirAllEntries(dir.wfs, util.FullPath(dir.FullPath()), "", func(entry *filer_pb.Entry, isLast bool) { |
