We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SortArrayMapConsistentHash: public void add(long key, String value) { // fix #79 sortArrayMap.clear(); for (int i = 0; i < VIRTUAL_NODE_SIZE; i++) { Long hash = super.hash("vir" + key + i); sortArrayMap.add(hash,value); } sortArrayMap.add(key, value); } TreeMapConsistentHash: public void add(long key, String value) {
// fix https://github.com/crossoverJie/cim/issues/79 treeMap.clear(); for (int i = 0; i < VIRTUAL_NODE_SIZE; i++) { Long hash = super.hash("vir" + key + i); treeMap.put(hash,value); } treeMap.put(key, value); }
master分支上的这两个hash的存储方式的add方法会导致集群部署时,始终只会从最后一个节点中的三个虚拟节点选择,而其他节点都被clear掉了
The text was updated successfully, but these errors were encountered:
哇,刚好在尝试部署多台 server,感谢指出避坑!
Sorry, something went wrong.
No branches or pull requests
SortArrayMapConsistentHash:
public void add(long key, String value) {
// fix #79
sortArrayMap.clear();
for (int i = 0; i < VIRTUAL_NODE_SIZE; i++) {
Long hash = super.hash("vir" + key + i);
sortArrayMap.add(hash,value);
}
sortArrayMap.add(key, value);
}
TreeMapConsistentHash:
public void add(long key, String value) {
master分支上的这两个hash的存储方式的add方法会导致集群部署时,始终只会从最后一个节点中的三个虚拟节点选择,而其他节点都被clear掉了
The text was updated successfully, but these errors were encountered: