diff --git a/k4.go b/k4.go index 36ea930..2e7029d 100644 --- a/k4.go +++ b/k4.go @@ -510,11 +510,16 @@ func (k4 *K4) flushMemtable(memtable *skiplist.SkipList) error { // add all the keys to the bloom filter for it.Next() { - key, _ := it.Current() + key, val := it.Current() if key == nil { continue } + // Check if tombstone + if bytes.Compare(val, []byte(TOMBSTONE_VALUE)) == 0 { + continue // skip tombstones + } + bf.Add(key) }