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

Function clearFailoverState

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

Resets the internal failover configuration, this needs * to be called after a failover either succeeds or fails * as it includes the client unpause. */

Source from the content-addressed store, hash-verified

3559 * to be called after a failover either succeeds or fails
3560 * as it includes the client unpause. */
3561void clearFailoverState() {
3562 server.failover_end_time = 0;
3563 server.force_failover = 0;
3564 zfree(server.target_replica_host);
3565 server.target_replica_host = NULL;
3566 server.target_replica_port = 0;
3567 server.failover_state = NO_FAILOVER;
3568 unpauseClients();
3569}
3570
3571/* Abort an ongoing failover if one is going on. */
3572void abortFailover(const char *err) {

Callers 2

syncWithMasterFunction · 0.85
abortFailoverFunction · 0.85

Calls 2

unpauseClientsFunction · 0.85
zfreeFunction · 0.70

Tested by

no test coverage detected