mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Cluster: when slave changes master, remove it from the old master.
This commit is contained in:
parent
70091a2f63
commit
c39e34d007
@ -933,6 +933,8 @@ int clusterProcessPacket(clusterLink *link) {
|
|||||||
|
|
||||||
/* Master node changed for this slave? */
|
/* Master node changed for this slave? */
|
||||||
if (sender->slaveof != master) {
|
if (sender->slaveof != master) {
|
||||||
|
if (sender->slaveof)
|
||||||
|
clusterNodeRemoveSlave(sender->slaveof,sender);
|
||||||
clusterNodeAddSlave(master,sender);
|
clusterNodeAddSlave(master,sender);
|
||||||
sender->slaveof = master;
|
sender->slaveof = master;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user