summaryrefslogtreecommitdiff
path: root/src/cluster.h
diff options
context:
space:
mode:
authorharrylhl <119452702+harrylhl@users.noreply.github.com>2023-01-11 16:42:23 -0800
committerGitHub <noreply@github.com>2023-01-11 16:42:23 -0800
commit395d801a2d978c3bb3139498c51825c393ae4450 (patch)
tree473be5d69d1013725706473f782e85f09838927a /src/cluster.h
parent12826fa38f0c481cce36f30b96b82028b1def0cb (diff)
downloadredis-395d801a2d978c3bb3139498c51825c393ae4450.tar.gz
Increase frequency of failover log and emit the status of the election to help debugging (#11665)
This change increase the frequency of the failover log from 5 minutes to 10 seconds. This log is only emitted when a replica has an outstanding election is progress, and waiting 5 minutes for the next log makes debugging and alarming on the log messages too slow. It also now prints out the number of votes the replica has currently received as well as the number of votes it needs to achieve quorum so that we can track the progress if it's running slowly. Co-authored-by: Madelyn Olson <34459052+madolson@users.noreply.github.com>
Diffstat (limited to 'src/cluster.h')
-rw-r--r--src/cluster.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cluster.h b/src/cluster.h
index b76a9a7cd..f3e8e32c6 100644
--- a/src/cluster.h
+++ b/src/cluster.h
@@ -73,7 +73,7 @@ typedef struct clusterLink {
#define CLUSTER_CANT_FAILOVER_WAITING_DELAY 2
#define CLUSTER_CANT_FAILOVER_EXPIRED 3
#define CLUSTER_CANT_FAILOVER_WAITING_VOTES 4
-#define CLUSTER_CANT_FAILOVER_RELOG_PERIOD (60*5) /* seconds. */
+#define CLUSTER_CANT_FAILOVER_RELOG_PERIOD (10) /* seconds. */
/* clusterState todo_before_sleep flags. */
#define CLUSTER_TODO_HANDLE_FAILOVER (1<<0)