Skip to content

Commit

Permalink
STAR-725 Bloom false positive rate includes true negatives (apache#164)
Browse files Browse the repository at this point in the history
This is a port of CASSANDRA-15384 that was partially ported in the
last oss -> dse-db port. Only the corresponding dtest was ported
and now it constantly fails without the actual fix in dse-db code.

Patch by Jaroslaw Grabowski; reviewed by brandonwilliams and paulo for
CASSANDRA-15384

Before this change the bloom filter false positive rate was calculated
without true negatives which resulted in high rates. In an extreme case,
where all queries return no data, the false positive rate could go up to
1.0.

This change includes true negatives in [recent] bloom filter false ratio.

(cherry picked from commit c0fa154)
(cherry picked from commit bd77281)
(cherry picked from commit d859bc9)
  • Loading branch information
jtgrabowski authored and jacek-lewandowski committed Apr 19, 2022
1 parent 330f036 commit 31f38e9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ public RowIndexEntry getExactPosition(DecoratedKey dk,
{
listener.onSSTableSkipped(this, SkippingReason.BLOOM_FILTER);
Tracing.trace("Bloom filter allows skipping sstable {}", descriptor.id.asString());
if (updateStats)
bloomFilterTracker.addTrueNegative();
return null;
}

Expand Down

0 comments on commit 31f38e9

Please sign in to comment.