Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification Requested Regarding Bloom Filter Key Check #1208

Open
jflopezfdez opened this issue Oct 2, 2024 · 0 comments
Open

Clarification Requested Regarding Bloom Filter Key Check #1208

jflopezfdez opened this issue Oct 2, 2024 · 0 comments

Comments

@jflopezfdez
Copy link

The Bloom filter source file includes a check on line 57 that it carries out before doing anything else that causes it to return false if the current Bloom filter bit size policy is currently set to anything less than two bytes: image

My question is, is this indeed the intended behavior? The false-positive rate on a Bloom filter will of course improve with additional hash functions, provided the Bloom filter is actually large enough, but if I understand correctly, we don't absolutely need multiple hash functions; we could simply use only one. While the usefulness of such a Bloom filter would not be exactly phenomenal, it should still be "correct" (as defined by this weird edge case, since obviously Bloom filters are probabilistic anyways).

Why is it that we carry out this check? Is this just a smoke test making sure we have at least two bytes of data before attempting to check the hash? Is this actually a realistic/historical failure mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant