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

runtime: opportunistically rotate map key seed #25237

Open
josharian opened this Issue May 3, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@josharian
Contributor

josharian commented May 3, 2018

As further protection, when the size of a non-tiny map drops to zero, we should update its hash seed. This is a reminder issue.

See discussion in CL 110055.

cc @martisch @randall77

@josharian josharian added the NeedsFix label May 3, 2018

@josharian josharian added this to the Go1.12 milestone May 3, 2018

@josharian josharian self-assigned this May 3, 2018

@CAFxX

This comment has been minimized.

Contributor

CAFxX commented May 4, 2018

Just curious: why not do the same when map growing is initiated? Is there something preventing the new/bigger map storage to use a different seed?

@randall77

This comment has been minimized.

Contributor

randall77 commented May 4, 2018

The way we grow the map, it isn't possible. Each original bucket evacuates to just two new buckets. The hashes need to agree on all the common bits.
There might be other growing algorithms where it could work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment