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

Function sentinelFailoverWaitPromotion

src/sentinel.cpp:4830–4837  ·  view source on GitHub ↗

We actually wait for promotion indirectly checking with INFO when the * slave turns into a master. */

Source from the content-addressed store, hash-verified

4828/* We actually wait for promotion indirectly checking with INFO when the
4829 * slave turns into a master. */
4830void sentinelFailoverWaitPromotion(sentinelRedisInstance *ri) {
4831 /* Just handle the timeout. Switching to the next state is handled
4832 * by the function parsing the INFO command of the promoted slave. */
4833 if (mstime() - ri->failover_state_change_time > ri->failover_timeout) {
4834 sentinelEvent(LL_WARNING,"-failover-abort-slave-timeout",ri,"%@");
4835 sentinelAbortFailover(ri);
4836 }
4837}
4838
4839void sentinelFailoverDetectEnd(sentinelRedisInstance *master) {
4840 int not_reconfigured = 0, timeout = 0;

Callers 1

Calls 3

sentinelEventFunction · 0.85
sentinelAbortFailoverFunction · 0.85
mstimeFunction · 0.70

Tested by

no test coverage detected