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

Function resetManualFailover

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

Reset the manual failover state. This works for both masters and slaves * as all the state about manual failover is cleared. * * The function can be used both to initialize the manual failover state at * startup or to abort a manual failover in progress. */

Source from the content-addressed store, hash-verified

3449 * The function can be used both to initialize the manual failover state at
3450 * startup or to abort a manual failover in progress. */
3451void resetManualFailover(void) {
3452 if (server.cluster->mf_end) {
3453 checkClientPauseTimeoutAndReturnIfPaused();
3454 }
3455 server.cluster->mf_end = 0; /* No manual failover in progress. */
3456 server.cluster->mf_can_start = 0;
3457 server.cluster->mf_slave = NULL;
3458 server.cluster->mf_master_offset = -1;
3459}
3460
3461/* If a manual failover timed out, abort it. */
3462void manualFailoverCheckTimeout(void) {

Callers 7

clusterInitFunction · 0.85
clusterResetFunction · 0.85
clusterProcessPacketFunction · 0.85
clusterSetMasterFunction · 0.85
clusterCommandFunction · 0.85

Tested by

no test coverage detected