reverting and working

This commit is contained in:
Chris Lu
2020-06-28 10:14:17 -07:00
parent b813fac4a3
commit 1bb8cae65d
11 changed files with 478 additions and 53 deletions

View File

@@ -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 {