提交 dc4af606 编写于 作者: A antirez

Cluster: clusterAddSlot() was not doing what stated in the comment.

上级 fdb57233
......@@ -1135,8 +1135,8 @@ int clusterNodeGetSlotBit(clusterNode *n, int slot) {
* If the slot is already assigned to another instance this is considered
* an error and REDIS_ERR is returned. */
int clusterAddSlot(clusterNode *n, int slot) {
if (clusterNodeSetSlotBit(n,slot) != 0)
return REDIS_ERR;
if (server.cluster->slots[slot]) return REDIS_ERR;
clusterNodeSetSlotBit(n,slot);
server.cluster->slots[slot] = n;
return REDIS_OK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册