Cluster: some code about clusterHandleSlaveFailover() marginally improved.

80 cols friendly, some minor change to the code to make it simpler.
This commit is contained in:
antirez
2013-11-29 16:17:05 +01:00
parent 55f90b11c9
commit 3db825fde4
2 changed files with 15 additions and 13 deletions

View File

@ -83,7 +83,7 @@ typedef struct clusterState {
clusterNode *slots[REDIS_CLUSTER_SLOTS];
zskiplist *slots_to_keys;
/* The following fields are used to take the slave state on elections. */
mstime_t failover_auth_time;/* Time at which we'll try to get elected in ms*/
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. */
uint64_t failover_auth_epoch; /* Epoch of the current election. */
@ -91,7 +91,7 @@ typedef struct clusterState {
uint64_t last_vote_epoch; /* Epoch of the last vote granted. */
int todo_before_sleep; /* Things to do in clusterBeforeSleep(). */
long long stats_bus_messages_sent; /* Num of msg sent via cluster bus. */
long long stats_bus_messages_received; /* Num of msg received via cluster bus. */
long long stats_bus_messages_received; /* Num of msg rcvd via cluster bus.*/
} clusterState;
/* clusterState todo_before_sleep flags. */