Skip to content

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

Description

@spybdai

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions