mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
ensure append only for deleted files
This commit is contained in:
parent
90018be9d2
commit
4c280bc317
|
@ -229,10 +229,10 @@ func (v *Volume) delete(n *Needle) (uint32, error) {
|
||||||
if err = v.nm.Delete(n.Id); err != nil {
|
if err = v.nm.Delete(n.Id); err != nil {
|
||||||
return nv.Size, err
|
return nv.Size, err
|
||||||
}
|
}
|
||||||
if _, err = v.dataFile.Seek(int64(nv.Offset*NeedlePaddingSize), 0); err != nil {
|
if _, err = v.dataFile.Seek(0, 2); err != nil {
|
||||||
return nv.Size, err
|
return nv.Size, err
|
||||||
}
|
}
|
||||||
n.Data = make([]byte,0)
|
n.Data = make([]byte, 0)
|
||||||
_, err = n.Append(v.dataFile, v.Version())
|
_, err = n.Append(v.dataFile, v.Version())
|
||||||
return nv.Size, err
|
return nv.Size, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue