Add the specified slot to the list of slots that node 'n' will * serve. Return C_OK if the operation ended with success. * If the slot is already assigned to another instance this is considered * an error and C_ERR is returned. */
| 3884 | * If the slot is already assigned to another instance this is considered |
| 3885 | * an error and C_ERR is returned. */ |
| 3886 | int clusterAddSlot(clusterNode *n, int slot) { |
| 3887 | if (server.cluster->slots[slot]) return C_ERR; |
| 3888 | clusterNodeSetSlotBit(n,slot); |
| 3889 | server.cluster->slots[slot] = n; |
| 3890 | return C_OK; |
| 3891 | } |
| 3892 | |
| 3893 | /* Delete the specified slot marking it as unassigned. |
| 3894 | * Returns C_OK if the slot was assigned, otherwise if the slot was |
no test coverage detected