mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
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.
This commit is contained in:
parent
3495caf4fb
commit
88c2307535
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user