59 Commits

Author SHA1 Message Date
antirez
0c36b17916 Cluster: refactoring: new macros to check node flags. 2014-01-29 12:17:16 +01:00
antirez
b8a0220498 Cluster: broadcast master/slave replication offset in bus header. 2014-01-28 16:51:50 +01:00
antirez
0ae1d07b01 Cluster: limit cluster.h to 80 cols. 2014-01-28 16:34:23 +01:00
antirez
91afff8fee Cluster: introduced repl_offset fields in clusterNode.
The two fields are used in order to remember the latest known
replication offset and the time we received it from other slave nodes.

This will be used by slaves in order to start the election procedure
with a delay that is proportional to the rank of the slave among the
other slaves for this master, when sorted for replication offset.

Usually this allows the slave with the most updated offset to win the
election and replace the failing master in the cluster.
2014-01-28 16:28:07 +01:00
antirez
5502face59 Cluster: basic data structures for nodes black list. 2013-11-29 17:37:06 +01:00
antirez
a829c85988 Cluster: some code about clusterHandleSlaveFailover() marginally improved.
80 cols friendly, some minor change to the code to make it simpler.
2013-11-29 16:17:05 +01:00
antirez
a19147c2fa Cluster: UPDATE msg data structure and sending function. 2013-11-08 16:26:50 +01:00
antirez
e4b341a335 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.
2013-10-09 16:19:26 +02:00
antirez
1560b70889 Cluster: cluster stuff moved from redis.h to cluster.h. 2013-10-09 15:38:05 +02:00