| 3588 | } |
| 3589 | |
| 3590 | static int clusterManagerSetSlotOwner(clusterManagerNode *owner, |
| 3591 | int slot, |
| 3592 | int do_clear) |
| 3593 | { |
| 3594 | int success = clusterManagerStartTransaction(owner); |
| 3595 | if (!success) return 0; |
| 3596 | /* Ensure the slot is not already assigned. */ |
| 3597 | clusterManagerDelSlot(owner, slot, 1); |
| 3598 | /* Add the slot and bump epoch. */ |
| 3599 | clusterManagerAddSlot(owner, slot); |
| 3600 | if (do_clear) clusterManagerClearSlotStatus(owner, slot); |
| 3601 | clusterManagerBumpEpoch(owner); |
| 3602 | success = clusterManagerExecTransaction(owner, clusterManagerOnSetOwnerErr); |
| 3603 | return success; |
| 3604 | } |
| 3605 | |
| 3606 | /* Get the hash for the values of the specified keys in *keys_reply for the |
| 3607 | * specified nodes *n1 and *n2, by calling DEBUG DIGEST-VALUE redis command |
no test coverage detected