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

generateCircle is using sort.Sort, which is not guaranteed to be stable #24

Open
spybdai opened this issue Dec 19, 2019 · 0 comments
Open

Comments

@spybdai
Copy link

spybdai commented Dec 19, 2019

Hashring.generateCircle() is using sort.Sort(data Interface) to sort sortedkeys, but this function is not guaranteed to be stable.
Is this a potential risk that, with some very edge cases, (for example, Hashring.AddNode or Hashring.RemoveNode is called, which invokes Hashring.generateCircle,) a range of keys will be mapped to a different node?

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