Browse Source

Fix memory not being unmapped

pull/1087/head
j.laycock 5 years ago
parent
commit
1e62a2b233
  1. 4
      weed/storage/volume_read_write.go

4
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) err = fmt.Errorf("volume %d is compacting", v.Id)
return return
} }
mem_map, exists := memory_map.FileMemoryMap[v.FileName()]
mem_map, exists := memory_map.FileMemoryMap[v.dataFile.Name()]
if exists { if exists {
mem_map.DeleteFileAndMemoryMap() mem_map.DeleteFileAndMemoryMap()
delete(memory_map.FileMemoryMap, v.FileName())
delete(memory_map.FileMemoryMap, v.dataFile.Name())
} }
v.Close() v.Close()

Loading…
Cancel
Save