Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
20700fe5
Commit
20700fe5
authored
May 25, 2015
by
antirez
Browse files
Sentinel: clarify effect of resetting failover_start_time.
parent
5080f2d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
20700fe5
...
...
@@ -1379,7 +1379,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).
*/
...
...
@@ -1402,7 +1404,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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment