Comment 0 for bug 1308077

Revision history for this message
Jianjun Zheng (codeeply) wrote :

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.

And the flag of use_sort_hosts should be enable, which makes the comparing of index(in the patch) meaningful.