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

Bloom crate is buggy and not maintained #25

Closed
mfil opened this issue Jul 24, 2019 · 3 comments · Fixed by #26
Closed

Bloom crate is buggy and not maintained #25

mfil opened this issue Jul 24, 2019 · 3 comments · Fixed by #26

Comments

@mfil
Copy link

mfil commented Jul 24, 2019

The bloom crate has a bug which was reported in 2017. There were no actions in the repo for three years.

Briefly, the bug is as follows: one needs to compute k hash values for an element added to the filter. In order to cut down the number of hash function calls, the crate computes two independent hashes and uses them as a seed for a RNG and then samples k values from it. I think that the basic idea is sound, but they botched the implementation of the RNG. See the next method for HashIter in src/hashing.rs. All RNG outputs after the first are a multiple of h2 modulo 2^64.

I'm sorry to say that I don't know a good alternative for the crate. I've been looking at several other bloom filter implementations in Rust for work and none of them inspired much confidence, so we ultimately decided to roll our own.

@bvssvni
Copy link
Contributor

bvssvni commented Jul 25, 2019

Do you plan to open source your own implementation?

@mfil
Copy link
Author

mfil commented Jul 25, 2019

I have to check with my employer, but probably not, unfortunately. We're also just getting started on it.

@mfil
Copy link
Author

mfil commented Jul 29, 2019

If you don't need bloom filters specifically, you could also check out cuckoofilters: https://crates.io/crates/cuckoofilter

They're supposed to have better performance.

bvssvni added a commit to bvssvni/linear_solver that referenced this issue Jul 30, 2019
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

Successfully merging a pull request may close this issue.

2 participants