diff --git a/go/storage/volume.go b/go/storage/volume.go index bd11f48c6..9f16dd638 100644 --- a/go/storage/volume.go +++ b/go/storage/volume.go @@ -221,15 +221,16 @@ func (v *Volume) delete(n *Needle) (uint32, error) { //fmt.Println("key", n.Id, "volume offset", nv.Offset, "data_size", n.Size, "cached size", nv.Size) if ok { var err error + size := nv.Size if err = v.nm.Delete(n.Id); err != nil { - return nv.Size, err + return size, err } if _, err = v.dataFile.Seek(0, 2); err != nil { - return nv.Size, err + return size, err } n.Data = make([]byte, 0) _, err = n.Append(v.dataFile, v.Version()) - return nv.Size, err + return size, err } return 0, nil }