You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (Jira)" <ji...@apache.org> on 2021/05/18 14:17:00 UTC

[jira] [Updated] (CASSANDRA-15834) Bloom filter false positive rate calculation does not take into account true negatives

     [ https://issues.apache.org/jira/browse/CASSANDRA-15834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-15834:
-----------------------------------------
    Fix Version/s: 4.0
                   4.0-rc2
                   3.11.11
                   3.0.25

> Bloom filter false positive rate calculation does not take into account true negatives
> --------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15834
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15834
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Observability/JMX
>            Reporter: Jaroslaw Grabowski
>            Assignee: Jaroslaw Grabowski
>            Priority: Normal
>             Fix For: 3.0.25, 3.11.11, 4.0-rc2, 4.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The bloom filter false positive ratio is [currently computed|https://github.com/apache/cassandra/blob/ded62076e7fdfd1cfdcf96447489ea607ca796a0/src/java/org/apache/cassandra/metrics/TableMetrics.java#L738] as:
> {{bf_fp_ratio = false_positive_count / (false_positive_count + true_positive_count)}}
> However, this calculation doesn't take into account true negatives (false negatives never happen on bloom filters).
> In a situation where there are 1000 reads for non existing rows, and there are 10 false positives, the bloom filter false positive ratio will be wrongly calculated as 10/10 = 1.0, while it should be 10/1000 = 0.01.
> We should update the calculation to:
> {{bf_fp_ratio = false_positive_count / #bf_queries}}
> Original jira by [~pauloricardomg]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org