ensure releasing file handle

This commit is contained in:
chrislu
2022-03-07 14:01:24 -08:00
parent 8136384473
commit 3aeee3d748
3 changed files with 9 additions and 0 deletions

View File

@@ -88,6 +88,10 @@ func (fh *FileHandle) addChunks(chunks []*filer_pb.FileChunk) {
fh.chunkAddLock.Unlock()
}
func (fh *FileHandle) Release() {
fh.dirtyPages.Destroy()
}
func lessThan(a, b *filer_pb.FileChunk) bool {
if a.Mtime == b.Mtime {
return a.Fid.FileKey < b.Fid.FileKey