mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Cluster: senderCurrentEpoch == node currentEpoch was too strict.
We can accept a vote as long as its epoch is >= the epoch at which we started the voting process. There is no need for it to be exactly the same.
This commit is contained in:
parent
f1bfd8233b
commit
7970ebd80a
@ -1191,11 +1191,11 @@ int clusterProcessPacket(clusterLink *link) {
|
||||
} else if (type == CLUSTERMSG_TYPE_FAILOVER_AUTH_ACK) {
|
||||
if (!sender) return 1; /* We don't know that node. */
|
||||
/* We consider this vote only if the sender is a master serving
|
||||
* a non zero number of slots, with the currentEpoch that is equal
|
||||
* to our currentEpoch. */
|
||||
* a non zero number of slots, and its currentEpoch is greater or
|
||||
* equal to epoch where this node started the election. */
|
||||
if (sender->flags & REDIS_NODE_MASTER &&
|
||||
sender->numslots > 0 &&
|
||||
senderCurrentEpoch == server.cluster->currentEpoch)
|
||||
senderCurrentEpoch >= server.cluster->failover_auth_epoch)
|
||||
{
|
||||
server.cluster->failover_auth_count++;
|
||||
/* Maybe we reached a quorum here, set a flag to make sure
|
||||
|
Loading…
x
Reference in New Issue
Block a user