| 3199 | } |
| 3200 | |
| 3201 | int clusterManagerSetSlotOwner(clusterManagerNode *owner, |
| 3202 | int slot, |
| 3203 | int do_clear) |
| 3204 | { |
| 3205 | int success = clusterManagerStartTransaction(owner); |
| 3206 | if (!success) return 0; |
| 3207 | /* Ensure the slot is not already assigned. */ |
| 3208 | clusterManagerDelSlot(owner, slot, 1); |
| 3209 | /* Add the slot and bump epoch. */ |
| 3210 | clusterManagerAddSlot(owner, slot); |
| 3211 | if (do_clear) clusterManagerClearSlotStatus(owner, slot); |
| 3212 | clusterManagerBumpEpoch(owner); |
| 3213 | success = clusterManagerExecTransaction(owner, clusterManagerOnSetOwnerErr); |
| 3214 | return success; |
| 3215 | } |
| 3216 | |
| 3217 | /* Get the hash for the values of the specified keys in *keys_reply for the |
| 3218 | * specified nodes *n1 and *n2, by calling DEBUG DIGEST-VALUE redis command |
no test coverage detected