aboutsummaryrefslogtreecommitdiff
path: root/weed/command/fix.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-09 22:29:02 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-09 22:29:02 -0700
commit0871d2cff091e43190065bd17dba624cf6da1d6d (patch)
tree3979790d89967d24e804f8e19c43ba3f729e1212 /weed/command/fix.go
parent1f8fc4b5edfeb9838345de146beb1ec033231dd3 (diff)
downloadseaweedfs-0871d2cff091e43190065bd17dba624cf6da1d6d.tar.xz
seaweedfs-0871d2cff091e43190065bd17dba624cf6da1d6d.zip
volume: fix memory leak during compaction
fix https://github.com/chrislusf/seaweedfs/issues/1222
Diffstat (limited to 'weed/command/fix.go')
-rw-r--r--weed/command/fix.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/weed/command/fix.go b/weed/command/fix.go
index 8903595fa..90d1c4893 100644
--- a/weed/command/fix.go
+++ b/weed/command/fix.go
@@ -70,6 +70,7 @@ func runFix(cmd *Command, args []string) bool {
indexFileName := path.Join(*fixVolumePath, baseFileName+".idx")
nm := needle_map.NewMemDb()
+ defer nm.Close()
vid := needle.VolumeId(*fixVolumeId)
scanner := &VolumeFileScanner4Fix{