Cluster: function clusterGetSlaveRank() added.

Return the number of slaves for the same master having a better
replication offset of the current slave, that is, the slave "rank" used
to pick a delay before the request for election.
This commit is contained in:
antirez
2014-01-29 16:39:04 +01:00
parent 40cd38f0c4
commit 6f54032080
3 changed files with 52 additions and 9 deletions

View File

@ -1073,6 +1073,7 @@ void processClientsWaitingReplicas(void);
void unblockClientWaitingReplicas(redisClient *c);
int replicationCountAcksByOffset(long long offset);
void replicationSendNewlineToMaster(void);
long long replicationGetSlaveOffset(void);
/* Generic persistence functions */
void startLoading(FILE *fp);