Skip to content

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

@spybdai

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?

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