Skip to content

Commit

Permalink
restore: bloom filter keying for tombstone
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Jan 18, 2024
1 parent 3302a52 commit 80fe674
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/segment/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,12 @@ impl Writer {
self.key_count += 1;
self.current_key = Some(item.key.clone());

// NOTE: If the first version of the key is a tombstone,
// it definitely does not exist, so we don't need to
// consider it in the bloom filter
if !item.is_tombstone() {
// IMPORTANT: Do not buffer *every* item's key
// because there may be multiple versions
// of the same key
#[cfg(feature = "bloom")]
self.bloom_hash_buffer
.push(BloomFilter::get_hash(&item.key));
}
// IMPORTANT: Do not buffer *every* item's key
// because there may be multiple versions
// of the same key
#[cfg(feature = "bloom")]
self.bloom_hash_buffer
.push(BloomFilter::get_hash(&item.key));
}

let item_key = item.key.clone();
Expand Down

0 comments on commit 80fe674

Please sign in to comment.