diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-04 17:58:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-04 17:58:41 +0000 |
commit | 7aaff451bafb4b43e1626b329e59a4c9aa7fc31d (patch) | |
tree | ef3363c81916814c65c92fbbfa49f5cb2be77bba /src/cluster.c | |
parent | Adding debian version 5:7.2.4-1. (diff) | |
download | redis-7aaff451bafb4b43e1626b329e59a4c9aa7fc31d.tar.xz redis-7aaff451bafb4b43e1626b329e59a4c9aa7fc31d.zip |
Merging upstream version 5:7.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/cluster.c')
-rw-r--r-- | src/cluster.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cluster.c b/src/cluster.c index c985d0b..637837c 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -988,7 +988,7 @@ void clusterInit(void) { server.cluster->myself = NULL; server.cluster->currentEpoch = 0; server.cluster->state = CLUSTER_FAIL; - server.cluster->size = 1; + server.cluster->size = 0; server.cluster->todo_before_sleep = 0; server.cluster->nodes = dictCreate(&clusterNodesDictType); server.cluster->shards = dictCreate(&clusterSdsToListType); @@ -4771,10 +4771,13 @@ void clusterCron(void) { /* Timeout reached. Set the node as possibly failing if it is * not already in this state. */ if (!(node->flags & (CLUSTER_NODE_PFAIL|CLUSTER_NODE_FAIL))) { - serverLog(LL_DEBUG,"*** NODE %.40s possibly failing", - node->name); node->flags |= CLUSTER_NODE_PFAIL; update_state = 1; + if (myself->flags & CLUSTER_NODE_MASTER && server.cluster->size == 1) { + markNodeAsFailingIfNeeded(node); + } else { + serverLog(LL_DEBUG,"*** NODE %.40s possibly failing", node->name); + } } } } |