summaryrefslogtreecommitdiff
path: root/src/cluster.c
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2022-10-02 23:25:16 -0700
committerGitHub <noreply@github.com>2022-10-03 09:25:16 +0300
commit663fbd34592aef3d24ac347ad00dbd02f3c7b713 (patch)
treea31b9cf7ec239be605fa94d0104e7f39f668d676 /src/cluster.c
parenta549b78c48121c698c84536d25404a23f01c167d (diff)
downloadredis-663fbd34592aef3d24ac347ad00dbd02f3c7b713.tar.gz
Stabilize cluster hostnames tests (#11307)
This PR introduces a couple of changes to improve cluster test stability: 1. Increase the cluster node timeout to 3 seconds, which is similar to the normal cluster tests, but introduce a new mechanism to increase the ping period so that the tests are still fast. This new config is a debug config. 2. Set `cluster-replica-no-failover yes` on a wider array of tests which are sensitive to failovers. This was occurring on the ARM CI.
Diffstat (limited to 'src/cluster.c')
-rw-r--r--src/cluster.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cluster.c b/src/cluster.c
index c788194f1..e08ed6acb 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -4198,9 +4198,11 @@ void clusterCron(void) {
* received PONG is older than half the cluster timeout, send
* a new ping now, to ensure all the nodes are pinged without
* a too big delay. */
+ mstime_t ping_interval = server.cluster_ping_interval ?
+ server.cluster_ping_interval : server.cluster_node_timeout/2;
if (node->link &&
node->ping_sent == 0 &&
- (now - node->pong_received) > server.cluster_node_timeout/2)
+ (now - node->pong_received) > ping_interval)
{
clusterSendPing(node->link, CLUSTERMSG_TYPE_PING);
continue;