Skip to content

ensures the consistent hash cycle unchanged when collide #41

@m6w6

Description

@m6w6

Imported from Launchpad using lp2gh.


When the virtual node A and virtual node B collides, the order of A and B on the consistent hash cycle is undetermined.
Because of different implementation of sort functions in various languages or unstable sort algorithm like quick sort,
the order of A and B may be different in different clients(e.g. Client X, Client Y).

It could cause such a serious problem:
Client X : set foo hello
Client Y : get foo
with a small probability:
the client X's key(foo) point to node A, while the client Y's key point to node B.

Thus, all the keys that point to node B in Client Y will fail when doing Get commands.

It will be better if the flag of use_sort_hosts gets set, which makes the comparing of index(in the patch) meaningful even when servers order in the configure rearranged.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions