Cluster: hash slots tracking using a radix tree.

This commit is contained in:
antirez
2017-03-27 15:26:56 +02:00
parent 94751543b0
commit 1409c545da
9 changed files with 2114 additions and 64 deletions

View File

@ -116,7 +116,8 @@ typedef struct clusterState {
clusterNode *migrating_slots_to[CLUSTER_SLOTS];
clusterNode *importing_slots_from[CLUSTER_SLOTS];
clusterNode *slots[CLUSTER_SLOTS];
zskiplist *slots_to_keys;
uint64_t slots_keys_count[CLUSTER_SLOTS];
rax *slots_to_keys;
/* The following fields are used to take the slave state on elections. */
mstime_t failover_auth_time; /* Time of previous or next election. */
int failover_auth_count; /* Number of votes received so far. */