diff options
| author | Chris Lu <chris.lu@uber.com> | 2021-04-09 12:36:39 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2021-04-09 12:36:39 -0700 |
| commit | 93f4146ffa91c3a7851add1dcb19af4297e299c5 (patch) | |
| tree | 046fc5f2dec6d0829bc6595eb64c7b9717108cc1 /weed/filesys/filehandle.go | |
| parent | 6deb647a8f07fe3828ce87a7cdd6c5925ea7f09e (diff) | |
| download | seaweedfs-93f4146ffa91c3a7851add1dcb19af4297e299c5.tar.xz seaweedfs-93f4146ffa91c3a7851add1dcb19af4297e299c5.zip | |
properly release the view cache
Diffstat (limited to 'weed/filesys/filehandle.go')
| -rw-r--r-- | weed/filesys/filehandle.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 57aa41b8a..f04952e96 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -200,7 +200,7 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) err fh.Lock() defer fh.Unlock() - fh.f.clearEntry() + fh.f.entryViewCache = nil if fh.f.isOpen <= 0 { glog.V(0).Infof("Release reset %s open count %d => %d", fh.f.Name, fh.f.isOpen, 0) @@ -213,6 +213,7 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) err fh.f.isOpen-- fh.f.wfs.ReleaseHandle(fh.f.fullpath(), fuse.HandleID(fh.handle)) + fh.f.setReader(nil) } return nil |
