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()