mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
cli: check clusterManagerSetSlot return value during migration
This commit is contained in:
parent
e0bb2a31d4
commit
1200115af0
1 changed files with 6 additions and 1 deletions
|
|
@ -5191,7 +5191,12 @@ static int clusterManagerMigrateKeysInSlot(clusterManagerNode *source,
|
|||
clusterManagerLogWarn("*** Slot was not served, setting "
|
||||
"owner to node %s:%d.\n",
|
||||
target->ip, target->port);
|
||||
clusterManagerSetSlot(source, target, slot, "node", NULL);
|
||||
int setslot_ok = clusterManagerSetSlot(source, target, slot, "node", NULL);
|
||||
if (!setslot_ok) {
|
||||
clusterManagerLogErr("*** Failed to set slot owner for slot%d", slot);
|
||||
success = 0;
|
||||
goto next;
|
||||
}
|
||||
}
|
||||
/* If the key already exists in the target node (BUSYKEY),
|
||||
* check whether its value is the same in both nodes.
|
||||
|
|
|
|||
Loading…
Reference in a new issue