MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / clusterCloseAllSlots

Function clusterCloseAllSlots

src/cluster.cpp:3980–3985  ·  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

3978/* Clear the migrating / importing state for all the slots.
3979 * This is useful at initialization and when turning a master into slave. */
3980void clusterCloseAllSlots(void) {
3981 memset(g_pserver->cluster->migrating_slots_to,0,
3982 sizeof(g_pserver->cluster->migrating_slots_to));
3983 memset(g_pserver->cluster->importing_slots_from,0,
3984 sizeof(g_pserver->cluster->importing_slots_from));
3985}
3986
3987/* -----------------------------------------------------------------------------
3988 * Cluster state evaluation function

Callers 3

clusterInitFunction · 0.85
clusterResetFunction · 0.85
clusterSetMasterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected