Cluster: use server.cluster_node_timeout directly.

We used to copy this value into the server.cluster structure, however this
was not necessary.

The reason why we don't directly use server.cluster->node_timeout is
that things that can be configured via redis.conf need to be directly
available in the server structure as server.cluster is allocated later
only if needed in order to reduce the memory footprint of non-cluster
instances.
This commit is contained in:
antirez
2013-04-09 11:24:18 +02:00
parent ef4f25ff6e
commit 68cf249f81
2 changed files with 6 additions and 8 deletions

View File

@ -583,7 +583,6 @@ typedef struct {
clusterNode *myself; /* This node */
int state; /* REDIS_CLUSTER_OK, REDIS_CLUSTER_FAIL, ... */
int size; /* Num of master nodes with at least one slot */
int node_timeout;
dict *nodes; /* Hash table of name -> clusterNode structures */
clusterNode *migrating_slots_to[REDIS_CLUSTER_SLOTS];
clusterNode *importing_slots_from[REDIS_CLUSTER_SLOTS];