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

@ -1155,7 +1155,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
run_with_period(1000) replicationCron();
/* Run the Redis Cluster cron. */
run_with_period(1000) {
run_with_period(100) {
if (server.cluster_enabled) clusterCron();
}