summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-07-31 16:18:15 +0200
committerantirez <antirez@gmail.com>2012-09-27 13:05:19 +0200
commit201ed6d42e5b3319ee08fc1e47062b509e3a7f17 (patch)
tree5d014d18d7474e8e52d30fea21395f8c3f6cc312
parent7c9bfe10367a50c44aec53a59da14f2540f82aa4 (diff)
downloadredis-201ed6d42e5b3319ee08fc1e47062b509e3a7f17.tar.gz
Sentinel: sentinelRefreshInstanceInfo() comments improved a bit.
-rw-r--r--src/sentinel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sentinel.c b/src/sentinel.c
index d1c6befe2..f9b7453a4 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -1384,6 +1384,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
ri->info_refresh = mstime();
sdsfreesplitres(lines,numlines);
+ /* ---------------------------- Acting half ----------------------------- */
if (sentinel.tilt) return;
/* Act if a master turned into a slave. */
@@ -1407,11 +1408,12 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
if (!(ri->master->flags & SRI_FAILOVER_IN_PROGRESS) &&
(runid_changed || first_runid))
{
- /* If a slave turned into a master, but at the same time the
- * 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.
+ /* If a slave turned into maser but:
*
+ * 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. */
int retval;