From 1e62a2b233458262c875dcf182309cc2425fe5a8 Mon Sep 17 00:00:00 2001 From: "j.laycock" Date: Fri, 30 Aug 2019 16:55:33 +0100 Subject: [PATCH] Fix memory not being unmapped --- weed/storage/volume_read_write.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go index 477bea285..2cb437730 100644 --- a/weed/storage/volume_read_write.go +++ b/weed/storage/volume_read_write.go @@ -49,10 +49,10 @@ func (v *Volume) Destroy() (err error) { err = fmt.Errorf("volume %d is compacting", v.Id) return } - mem_map, exists := memory_map.FileMemoryMap[v.FileName()] + mem_map, exists := memory_map.FileMemoryMap[v.dataFile.Name()] if exists { mem_map.DeleteFileAndMemoryMap() - delete(memory_map.FileMemoryMap, v.FileName()) + delete(memory_map.FileMemoryMap, v.dataFile.Name()) } v.Close()