mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 17:40:50 +00:00
Cluster: clusterAddSlot() was not doing what stated in the comment.
This commit is contained in:
parent
fdb57233e2
commit
dc4af60628
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user