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. */
| 3953 | * Returns C_OK if the slot was assigned, otherwise if the slot was |
| 3954 | * already unassigned C_ERR is returned. */ |
| 3955 | int clusterDelSlot(int slot) { |
| 3956 | clusterNode *n = g_pserver->cluster->slots[slot]; |
| 3957 | |
| 3958 | if (!n) return C_ERR; |
| 3959 | serverAssert(clusterNodeClearSlotBit(n,slot) == 1); |
| 3960 | g_pserver->cluster->slots[slot] = NULL; |
| 3961 | return C_OK; |
| 3962 | } |
| 3963 | |
| 3964 | /* Delete all the slots associated with the specified node. |
| 3965 | * The number of deleted slots is returned. */ |
no test coverage detected