Delete the specified slot marking it as unassigned. * Returns C_OK if the slot was assigned, otherwise if the slot was * already unassigned C_ERR is returned. */
| 3894 | * Returns C_OK if the slot was assigned, otherwise if the slot was |
| 3895 | * already unassigned C_ERR is returned. */ |
| 3896 | int clusterDelSlot(int slot) { |
| 3897 | clusterNode *n = server.cluster->slots[slot]; |
| 3898 | |
| 3899 | if (!n) return C_ERR; |
| 3900 | serverAssert(clusterNodeClearSlotBit(n,slot) == 1); |
| 3901 | server.cluster->slots[slot] = NULL; |
| 3902 | return C_OK; |
| 3903 | } |
| 3904 | |
| 3905 | /* Delete all the slots associated with the specified node. |
| 3906 | * The number of deleted slots is returned. */ |
no test coverage detected