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

Function abortFailover

app/redis-6.2.6/src/replication.c:3572–3585  ·  view source on GitHub ↗

Abort an ongoing failover if one is going on. */

Source from the content-addressed store, hash-verified

3570
3571/* Abort an ongoing failover if one is going on. */
3572void abortFailover(const char *err) {
3573 if (server.failover_state == NO_FAILOVER) return;
3574
3575 if (server.target_replica_host) {
3576 serverLog(LL_NOTICE,"FAILOVER to %s:%d aborted: %s",
3577 server.target_replica_host,server.target_replica_port,err);
3578 } else {
3579 serverLog(LL_NOTICE,"FAILOVER to any replica aborted: %s",err);
3580 }
3581 if (server.failover_state == FAILOVER_IN_PROGRESS) {
3582 replicationUnsetMaster();
3583 }
3584 clearFailoverState();
3585}
3586
3587/*
3588 * FAILOVER [TO <HOST> <PORT> [FORCE]] [ABORT] [TIMEOUT <timeout>]

Callers 3

syncWithMasterFunction · 0.85
failoverCommandFunction · 0.85
updateFailoverStatusFunction · 0.85

Calls 2

replicationUnsetMasterFunction · 0.85
clearFailoverStateFunction · 0.85

Tested by

no test coverage detected