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
201ed6d4
Commit
201ed6d4
authored
Jul 31, 2012
by
antirez
Browse files
Sentinel: sentinelRefreshInstanceInfo() comments improved a bit.
parent
7c9bfe10
Changes
1
Show whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
201ed6d4
...
@@ -1384,6 +1384,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
...
@@ -1384,6 +1384,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
ri->info_refresh = mstime();
ri->info_refresh = mstime();
sdsfreesplitres(lines,numlines);
sdsfreesplitres(lines,numlines);
/* ---------------------------- Acting half ----------------------------- */
if (sentinel.tilt) return;
if (sentinel.tilt) return;
/* Act if a master turned into a slave. */
/* Act if a master turned into a slave. */
...
@@ -1407,11 +1408,12 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
...
@@ -1407,11 +1408,12 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
if (!(ri->master->flags & SRI_FAILOVER_IN_PROGRESS) &&
if (!(ri->master->flags & SRI_FAILOVER_IN_PROGRESS) &&
(runid_changed || first_runid))
(runid_changed || first_runid))
{
{
/* If a slave turned into a master, but at the same time the
/* If a slave turned into maser but:
* runid has changed, or it is simply the first time we see and
* INFO output from this instance, this is a reboot with a wrong
* configuration.
*
*
* 1) Failover not in progress.
* 2) RunID hs changed, or its the first time we see an INFO output.
*
* We assume this is a reboot with a wrong configuration.
* Log the event and remove the slave. */
* Log the event and remove the slave. */
int retval;
int retval;
...
...
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