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
e7628be2
Commit
e7628be2
authored
Mar 05, 2013
by
antirez
Browse files
Cluster: set node->slaveof correctly when a node state is updated.
parent
d6457577
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
e7628be2
...
@@ -854,7 +854,10 @@ int clusterProcessPacket(clusterLink *link) {
...
@@ -854,7 +854,10 @@ int clusterProcessPacket(clusterLink *link) {
sender->flags &= ~REDIS_NODE_MASTER;
sender->flags &= ~REDIS_NODE_MASTER;
sender->flags |= REDIS_NODE_SLAVE;
sender->flags |= REDIS_NODE_SLAVE;
if (sender->numslaves) clusterNodeResetSlaves(sender);
if (sender->numslaves) clusterNodeResetSlaves(sender);
if (master) clusterNodeAddSlave(master,sender);
if (master) {
clusterNodeAddSlave(master,sender);
sender->slaveof = master;
}
}
}
}
}
...
...
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