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

sketch bug from 2019 hasn't been fixed #12

Open
FrankReh opened this issue Mar 3, 2024 · 0 comments
Open

sketch bug from 2019 hasn't been fixed #12

FrankReh opened this issue Mar 3, 2024 · 0 comments

Comments

@FrankReh
Copy link

FrankReh commented Mar 3, 2024

s.rows[i].increment((hashed ^ s.seed[i]) & s.mask)

As the post in dgraph-io/ristretto#108 tried to highlight, the XOR with the same seed for each given row doesn't accomplish what the author of the change had expected. So you don't get the benefit of four rows. Might as well just make the structure one row. Of course four rows was the original design of Ben Manes for good reason, so reverting to the earlier approach or coming up with a different way to pull a different count based on the row index and the hash is warranted.

Here's where I offered a fix dgraph-io/ristretto#326
and Ben chimed in that while it looked reasonable the go code could use more eyes and anyway, Vitess was moving to another derivation of his work.

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