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
a6fe4ca3
Commit
a6fe4ca3
authored
Jun 25, 2014
by
antirez
Browse files
CLUSTER SLOTS: main loop should skip only slaves and zero slot masters.
parent
e14829de
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
a6fe4ca3
...
@@ -3467,9 +3467,9 @@ void clusterReplyMultiBulkSlots(redisClient *c) {
...
@@ -3467,9 +3467,9 @@ void clusterReplyMultiBulkSlots(redisClient *c) {
clusterNode *node = dictGetVal(de);
clusterNode *node = dictGetVal(de);
int j = 0, start = -1;
int j = 0, start = -1;
/*
If node is down or not a master, skip it. */
/*
Skip slaves (that are iterated when producing the output of their
if
(
node
->
flags
&
REDIS_NODE_FAIL
||
!
(
node
->
flags
&
REDIS_NODE_MASTER
))
* master) and masters not serving any slot. */
continue
;
if (!nodeIsMaster(node) || node->numslots == 0)
continue;
for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) {
for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) {
int bit;
int bit;
...
...
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