提交 7970ebd8 编写于 作者: A antirez

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.
上级 f1bfd823
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册