From 88c23075355e22471cb9b35cafd3ba65f8870dba Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 26 May 2014 16:24:12 +0200 Subject: [PATCH] Cluster: always allow ok -> fail switch in clusterUpdateState(). There is a time defined by REDIS_CLUSTER_WRITABLE_DELAY where fail -> ok switch is not possible after startup as a master for some time, however the contrary (ok -> fail) should always be possible. --- src/cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cluster.c b/src/cluster.c index 638189de..948cc914 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -3076,6 +3076,7 @@ void clusterUpdateState(void) { * to don't count the DB loading time. */ if (first_call_time == 0) first_call_time = mstime(); if (nodeIsMaster(myself) && + server.cluster->state == REDIS_CLUSTER_FAIL && mstime() - first_call_time < REDIS_CLUSTER_WRITABLE_DELAY) return; /* Start assuming the state is OK. We'll turn it into FAIL if there