Skip to content

Commit

Permalink
Merge pull request redis#4128 from leonchen83/unstable
Browse files Browse the repository at this point in the history
fix mismatch argument and return wrong value of clusterDelNodeSlots
  • Loading branch information
antirez committed Jul 24, 2017
2 parents cf6e3be + f32a449 commit 632c1a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/cluster.c
Expand Up @@ -3602,8 +3602,10 @@ int clusterDelNodeSlots(clusterNode *node) {
int deleted = 0, j;

for (j = 0; j < CLUSTER_SLOTS; j++) {
if (clusterNodeGetSlotBit(node,j)) clusterDelSlot(j);
deleted++;
if (clusterNodeGetSlotBit(node,j)) {
clusterDelSlot(j);
deleted++;
}
}
return deleted;
}
Expand Down Expand Up @@ -4195,7 +4197,7 @@ void clusterCommand(client *c) {
}
if ((n = clusterLookupNode(c->argv[4]->ptr)) == NULL) {
addReplyErrorFormat(c,"I don't know about node %s",
(char*)c->argv[3]->ptr);
(char*)c->argv[4]->ptr);
return;
}
server.cluster->importing_slots_from[slot] = n;
Expand Down

0 comments on commit 632c1a1

Please sign in to comment.