提交 8c6e8680 编写于 作者: A antirez

Cluster: use clusterSetNodeAsMaster() during slave failover.

clusterHandleSlaveFailover() was reimplementing what
clusterSetNodeAsMaster() without any good reason.
上级 41a72416
......@@ -2504,10 +2504,7 @@ void clusterHandleSlaveFailover(void) {
* this slave to a master.
*
* 1) Turn this node into a master. */
clusterNodeRemoveSlave(myself->slaveof, myself);
myself->flags &= ~REDIS_NODE_SLAVE;
myself->flags |= REDIS_NODE_MASTER;
myself->slaveof = NULL;
clusterSetNodeAsMaster(myself);
replicationUnsetMaster();
/* 2) Claim all the slots assigned to our master. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册