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

@ -416,7 +416,7 @@ void loadServerConfigFromString(char *config) {
zfree(server.cluster_configfile);
server.cluster_configfile = zstrdup(argv[1]);
} else if (!strcasecmp(argv[0],"cluster-node-timeout") && argc == 2) {
server.cluster_node_timeout = atoi(argv[1]);
server.cluster_node_timeout = strtoll(argv[1],NULL,10);
if (server.cluster_node_timeout <= 0) {
err = "cluster node timeout must be 1 or greater"; goto loaderr;
}