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

Function clusterCloseAllSlots

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

Clear the migrating / importing state for all the slots. * This is useful at initialization and when turning a master into slave. */

Source from the content-addressed store, hash-verified

3919/* Clear the migrating / importing state for all the slots.
3920 * This is useful at initialization and when turning a master into slave. */
3921void clusterCloseAllSlots(void) {
3922 memset(server.cluster->migrating_slots_to,0,
3923 sizeof(server.cluster->migrating_slots_to));
3924 memset(server.cluster->importing_slots_from,0,
3925 sizeof(server.cluster->importing_slots_from));
3926}
3927
3928/* -----------------------------------------------------------------------------
3929 * Cluster state evaluation function

Callers 3

clusterInitFunction · 0.85
clusterResetFunction · 0.85
clusterSetMasterFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected