Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0f9422d5
Commit
0f9422d5
authored
Jan 22, 2014
by
antirez
Browse files
Cluster: update slaves lists in clusterSetMaster().
parent
5383ab0b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
0f9422d5
...
...
@@ -2501,8 +2501,12 @@ void clusterSetMaster(clusterNode *n) {
if (myself->flags & REDIS_NODE_MASTER) {
myself->flags &= ~REDIS_NODE_MASTER;
myself->flags |= REDIS_NODE_SLAVE;
} else {
if (myself->slaveof)
clusterNodeRemoveSlave(myself->slaveof,myself);
}
myself->slaveof = n;
clusterNodeAddSlave(n,myself);
replicationSetMaster(n->ip, n->port);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment