diff options
author | antirez <antirez@gmail.com> | 2015-05-25 10:32:28 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-09-07 15:53:08 +0200 |
commit | c47854615d37b61d340ba030b04ed7c62cbf4bd1 (patch) | |
tree | daa5126c780ed0d6a546c21cc10ffe93f48071bd | |
parent | 3ff2d65ffa818291c342163437aa815192826aa5 (diff) | |
download | redis-c47854615d37b61d340ba030b04ed7c62cbf4bd1.tar.gz |
Sentinel: clarify effect of resetting failover_start_time.
-rw-r--r-- | src/sentinel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sentinel.c b/src/sentinel.c index 03b072cc8..bbe8aa5de 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1156,7 +1156,9 @@ void sentinelDelFlagsToDictOfRedisInstances(dict *instances, int flags) { * 1) Remove all slaves. * 2) Remove all sentinels. * 3) Remove most of the flags resulting from runtime operations. - * 4) Reset timers to their default value. + * 4) Reset timers to their default value. For example after a reset it will be + * possible to failover again the same master ASAP, without waiting the + * failover timeout delay. * 5) In the process of doing this undo the failover if in progress. * 6) Disconnect the connections with the master (will reconnect automatically). */ @@ -1179,7 +1181,7 @@ void sentinelResetMaster(sentinelRedisInstance *ri, int flags) { } ri->failover_state = SENTINEL_FAILOVER_STATE_NONE; ri->failover_state_change_time = 0; - ri->failover_start_time = 0; + ri->failover_start_time = 0; /* We can failover again ASAP. */ ri->promoted_slave = NULL; sdsfree(ri->runid); sdsfree(ri->slave_master_host); |