ensures the consistent hash cycle unchanged when collide
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
New
|
Undecided
|
Unassigned |
Bug Description
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.
description: | updated |
description: | updated |
tags: | added: consistent hash |