aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/wfs.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-27 16:52:20 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-27 16:52:20 -0700
commit2a7957b4ca83fdb5232d761074e81dce6b99648f (patch)
tree7b9c00b3226b5641ea3fb5b0ff1692276ff05518 /weed/filesys/wfs.go
parent6190fd665d83a9a231deebc3dd57fb7479a0794d (diff)
downloadseaweedfs-2a7957b4ca83fdb5232d761074e81dce6b99648f.tar.xz
seaweedfs-2a7957b4ca83fdb5232d761074e81dce6b99648f.zip
FUSE: subcribe meta events based on timestamp
Diffstat (limited to 'weed/filesys/wfs.go')
-rw-r--r--weed/filesys/wfs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go
index de1fb1d2e..e7d1766b6 100644
--- a/weed/filesys/wfs.go
+++ b/weed/filesys/wfs.go
@@ -95,10 +95,11 @@ func NewSeaweedFileSystem(option *Option) *WFS {
}
if wfs.option.AsyncMetaDataCaching {
wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.CacheDir, "meta"))
+ startTime := time.Now()
if err := meta_cache.InitMetaCache(wfs.metaCache, wfs, wfs.option.FilerMountRootPath); err != nil{
glog.V(0).Infof("failed to init meta cache: %v", err)
} else {
- go meta_cache.SubscribeMetaEvents(wfs.metaCache, wfs, wfs.option.FilerMountRootPath)
+ go meta_cache.SubscribeMetaEvents(wfs.metaCache, wfs, wfs.option.FilerMountRootPath, startTime.UnixNano())
util.OnInterrupt(func() {
wfs.metaCache.Shutdown()
})