Cluster: use clusterSetNodeAsMaster() during slave failover.
clusterHandleSlaveFailover() was reimplementing what clusterSetNodeAsMaster() without any good reason.
This commit is contained in:
parent
8c6e92c3bc
commit
67133d2f48
@ -2504,10 +2504,7 @@ void clusterHandleSlaveFailover(void) {
|
|||||||
* this slave to a master.
|
* this slave to a master.
|
||||||
*
|
*
|
||||||
* 1) Turn this node into a master. */
|
* 1) Turn this node into a master. */
|
||||||
clusterNodeRemoveSlave(myself->slaveof, myself);
|
clusterSetNodeAsMaster(myself);
|
||||||
myself->flags &= ~REDIS_NODE_SLAVE;
|
|
||||||
myself->flags |= REDIS_NODE_MASTER;
|
|
||||||
myself->slaveof = NULL;
|
|
||||||
replicationUnsetMaster();
|
replicationUnsetMaster();
|
||||||
|
|
||||||
/* 2) Claim all the slots assigned to our master. */
|
/* 2) Claim all the slots assigned to our master. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user