Commit d9565379 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #4128 from leonchen83/unstable

fix mismatch argument and return wrong value of clusterDelNodeSlots
parents 7c3c472b 9e7a8c02
...@@ -3602,8 +3602,10 @@ int clusterDelNodeSlots(clusterNode *node) { ...@@ -3602,8 +3602,10 @@ int clusterDelNodeSlots(clusterNode *node) {
int deleted = 0, j; int deleted = 0, j;
for (j = 0; j < CLUSTER_SLOTS; j++) { for (j = 0; j < CLUSTER_SLOTS; j++) {
if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j); if (clusterNodeGetSlotBit(node,j)) {
deleted++; clusterDelSlot(j);
deleted++;
}
} }
return deleted; return deleted;
} }
...@@ -4195,7 +4197,7 @@ void clusterCommand(client *c) { ...@@ -4195,7 +4197,7 @@ void clusterCommand(client *c) {
} }
if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) { if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) {
addReplyErrorFormat(c,"I don't know about node %s", addReplyErrorFormat(c,"I don't know about node %s",
(char*)c->argv[3]->ptr); (char*)c->argv[4]->ptr);
return; return;
} }
server.cluster->importing_slots_from[slot] = n; server.cluster->importing_slots_from[slot] = n;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment