summaryrefslogtreecommitdiff
path: root/src/cluster.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-01-29 16:51:11 +0100
committerantirez <antirez@gmail.com>2014-01-29 16:53:45 +0100
commit940531e9b71dc1538cdaf96744a2b87e339ce836 (patch)
tree8dc8f9277b08b5be88d05a44b73d258a569ad175 /src/cluster.h
parent6f54032080d03c8e0145f9f816ce21879b2c98df (diff)
downloadredis-940531e9b71dc1538cdaf96744a2b87e339ce836.tar.gz
Cluster: added progressive election delay according to slave rank.
Note that when we compute the initial delay, there are probably still more up to date information to receive from slaves with new offsets, so the delay is recomputed when new data is available.
Diffstat (limited to 'src/cluster.h')
-rw-r--r--src/cluster.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cluster.h b/src/cluster.h
index 7ca20c05e..c07b37381 100644
--- a/src/cluster.h
+++ b/src/cluster.h
@@ -97,6 +97,7 @@ typedef struct clusterState {
mstime_t failover_auth_time; /* Time of previous or next election. */
int failover_auth_count; /* Number of votes received so far. */
int failover_auth_sent; /* True if we already asked for votes. */
+ int failover_auth_rank; /* This slave rank for current auth request. */
uint64_t failover_auth_epoch; /* Epoch of the current election. */
/* The followign fields are uesd by masters to take state on elections. */
uint64_t last_vote_epoch; /* Epoch of the last vote granted. */