Commit a4b155fd authored by Vitaly Arbuzov's avatar Vitaly Arbuzov
Browse files

Fix failing cluster tests

parent a871d66e
...@@ -52,12 +52,9 @@ dict *dbNextDict(dbIterator *iter) { ...@@ -52,12 +52,9 @@ dict *dbNextDict(dbIterator *iter) {
while (iter->index < iter->db->dict_count - 1) { while (iter->index < iter->db->dict_count - 1) {
iter->index++; iter->index++;
dict *d = iter->db->dict[iter->index]; dict *d = iter->db->dict[iter->index];
if (!server.cluster_enabled) return d; /* There is a single dictionary in non cluster mode. */ /* There is a single dictionary in non cluster mode,
clusterNode *myself = server.cluster->myself; * in cluster mode return first non-empty sub-dictionary. */
/* We need a non-empty dictionary that's owned by this node. */ if (!server.cluster_enabled || dictSize(d) > 0) return d;
if (clusterNodeGetSlotBit(myself, iter->index) && dictSize(d) > 0) {
return d;
}
} }
return NULL; return NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment