diff options
author | antirez <antirez@gmail.com> | 2014-06-25 15:08:33 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-06-26 15:16:23 +0200 |
commit | 94bbcf400daf7f836b3b7dc86a2a8b2fb0763f1e (patch) | |
tree | 088d365c14a91e66ecb8d4347baf05fcbb1e12ec | |
parent | 237188bf1b0e90911b96ecffa948e0e2d6402514 (diff) | |
download | redis-94bbcf400daf7f836b3b7dc86a2a8b2fb0763f1e.tar.gz |
CLUSTER SLOTS: main loop should skip only slaves and zero slot masters.
-rw-r--r-- | src/cluster.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cluster.c b/src/cluster.c index 252f19f05..264ef4f68 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -3467,9 +3467,9 @@ void clusterReplyMultiBulkSlots(redisClient *c) { clusterNode *node = dictGetVal(de); int j = 0, start = -1; - /* If node is down or not a master, skip it. */ - if (node->flags & REDIS_NODE_FAIL || !(node->flags & REDIS_NODE_MASTER)) - continue; + /* Skip slaves (that are iterated when producing the output of their + * master) and masters not serving any slot. */ + if (!nodeIsMaster(node) || node->numslots == 0) continue; for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) { int bit; |