Skip to content

Commit

Permalink
skip slave nodes when sending cluster setslot command
Browse files Browse the repository at this point in the history
  • Loading branch information
yongman committed Nov 21, 2018
1 parent 8acc07e commit 2f76829
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/redis-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -3962,6 +3962,7 @@ static int clusterManagerFixOpenSlot(int slot) {
while ((ln = listNext(&li)) != NULL) {
clusterManagerNode *n = ln->value;
if (n == owner) continue;
if (n->flags & CLUSTER_MANAGER_FLAG_SLAVE) continue;
redisReply *r = CLUSTER_MANAGER_COMMAND(n,
"CLUSTER SETSLOT %d %s %s", slot, "NODE", owner->name);
success = clusterManagerCheckRedisReply(n, r, NULL);
Expand Down

0 comments on commit 2f76829

Please sign in to comment.