Cluster: time switched from seconds to milliseconds.

All the internal state of cluster involving time is now using mstime_t
and mstime() in order to use milliseconds resolution.

Also the clusterCron() function is called with a 10 hz frequency instead
of 1 hz.

The cluster node_timeout must be also configured in milliseconds by the
user in redis.conf.
This commit is contained in:
antirez
2013-10-09 16:18:33 +02:00
parent 929b6a4480
commit ba42428633
5 changed files with 43 additions and 47 deletions

View File

@ -768,7 +768,7 @@ struct redisServer {
xor of REDIS_NOTIFY... flags. */
/* Cluster */
int cluster_enabled; /* Is cluster enabled? */
int cluster_node_timeout; /* Cluster node timeout. */
mstime_t cluster_node_timeout; /* Cluster node timeout. */
char *cluster_configfile; /* Cluster auto-generated config file name. */
struct clusterState *cluster; /* State of the cluster */
/* Scripting */