Skip to content

sketch bug from 2019 hasn't been fixed #12

@FrankReh

Description

@FrankReh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions