Reduce memory usage for "weed fix"

This commit is contained in:
Chris Lu
2014-05-31 17:10:51 -07:00
parent 08cbb2c345
commit 4b7b439be9
4 changed files with 9 additions and 6 deletions

View File

@@ -102,7 +102,7 @@ func runExport(cmd *Command, args []string) bool {
err = storage.ScanVolumeFile(*exportVolumePath, *exportCollection, vid, func(superBlock storage.SuperBlock) error {
version = superBlock.Version
return nil
}, func(n *storage.Needle, offset int64) error {
}, true, func(n *storage.Needle, offset int64) error {
nv, ok := nm.Get(n.Id)
glog.V(3).Infoln("key", n.Id, "offset", offset, "size", n.Size, "disk_size", n.DiskSize(), "gzip", n.IsGzipped(), "ok", ok, "nv", nv)
if ok && nv.Size > 0 {