aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/filehandle.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-06-28 10:14:17 -0700
committerChris Lu <chris.lu@gmail.com>2020-06-28 10:14:17 -0700
commit1bb8cae65d499dc48cc2d7db2dc5692482f3f305 (patch)
treee467980c5973dc2e3aeb6a2f1586b79df02e3c9c /weed/filesys/filehandle.go
parentb813fac4a39e9cec311a17706f70796d72a69bf2 (diff)
downloadseaweedfs-1bb8cae65d499dc48cc2d7db2dc5692482f3f305.tar.xz
seaweedfs-1bb8cae65d499dc48cc2d7db2dc5692482f3f305.zip
reverting and working
Diffstat (limited to 'weed/filesys/filehandle.go')
-rw-r--r--weed/filesys/filehandle.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index 9b9df916c..83daccad1 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -215,7 +215,9 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {
return fmt.Errorf("fh flush create %s: %v", fh.f.fullpath(), err)
}
- fh.f.wfs.metaCache.InsertEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
+ if fh.f.wfs.option.AsyncMetaDataCaching {
+ fh.f.wfs.metaCache.InsertEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
+ }
fh.f.wfs.deleteFileChunks(garbages)
for i, chunk := range garbages {