mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Cluster: actually setup replication in CLUSTER REPLICATE.
This commit is contained in:
parent
7bead003e2
commit
b8a28bf442
@ -1513,7 +1513,7 @@ void clusterSetMaster(clusterNode *n) {
|
||||
myself->flags |= REDIS_NODE_SLAVE;
|
||||
}
|
||||
myself->slaveof = n;
|
||||
/* TODO: actually handle replication to point to the new slave. */
|
||||
replicationSetMaster(n->ip, n->port);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
@ -1900,6 +1900,8 @@ void clusterCommand(redisClient *c) {
|
||||
|
||||
/* Set the master. */
|
||||
clusterSetMaster(n);
|
||||
clusterUpdateState();
|
||||
clusterSaveConfigOrDie();
|
||||
addReply(c,shared.ok);
|
||||
} else {
|
||||
addReplyError(c,"Wrong CLUSTER subcommand or number of arguments");
|
||||
|
Loading…
Reference in New Issue
Block a user