Skip to content

Commit

Permalink
correction don't add keys to bloomfilter who's values are tombstoned …
Browse files Browse the repository at this point in the history
…(flushing)
  • Loading branch information
Alex Gaetano Padula committed Nov 1, 2024
1 parent 2116e14 commit 14445fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion k4.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 14445fd

Please sign in to comment.