MCPcopy Create free account
hub / github.com/F-Stack/f-stack / clusterDelSlot

Function clusterDelSlot

app/redis-6.2.6/src/cluster.c:3896–3903  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

3894 * Returns C_OK if the slot was assigned, otherwise if the slot was
3895 * already unassigned C_ERR is returned. */
3896int 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. */

Callers 6

clusterResetFunction · 0.85
clusterDelNodeFunction · 0.85
clusterDelNodeSlotsFunction · 0.85
clusterCommandFunction · 0.85

Calls 1

clusterNodeClearSlotBitFunction · 0.85

Tested by

no test coverage detected