memory needle map mark size to be TombstoneFileSize

fix https://github.com/chrislusf/seaweedfs/issues/850
This commit is contained in:
Chris Lu 2019-01-26 00:05:44 -06:00
parent d3f675abc6
commit 5668ed798d

View file

@ -76,9 +76,9 @@ func (cs *CompactSection) Delete(key NeedleId) uint32 {
cs.Lock() cs.Lock()
ret := uint32(0) ret := uint32(0)
if i := cs.binarySearchValues(skey); i >= 0 { if i := cs.binarySearchValues(skey); i >= 0 {
if cs.values[i].Size > 0 { if cs.values[i].Size > 0 && cs.values[i].Size != TombstoneFileSize {
ret = cs.values[i].Size ret = cs.values[i].Size
cs.values[i].Size = 0 cs.values[i].Size = TombstoneFileSize
} }
} }
if v, found := cs.overflow.findOverflowEntry(skey); found { if v, found := cs.overflow.findOverflowEntry(skey); found {