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
a4b155fd
Commit
a4b155fd
authored
Jan 19, 2023
by
Vitaly Arbuzov
Browse files
Fix failing cluster tests
parent
a871d66e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
a4b155fd
...
...
@@ -52,12 +52,9 @@ dict *dbNextDict(dbIterator *iter) {
while (iter->index < iter->db->dict_count - 1) {
iter->index++;
dict *d = iter->db->dict[iter->index];
if (!server.cluster_enabled) return d; /* There is a single dictionary in non cluster mode. */
clusterNode *myself = server.cluster->myself;
/* We need a non-empty dictionary that's owned by this node. */
if (clusterNodeGetSlotBit(myself, iter->index) && dictSize(d) > 0) {
return d;
}
/* There is a single dictionary in non cluster mode,
* in cluster mode return first non-empty sub-dictionary. */
if (!server.cluster_enabled || dictSize(d) > 0) return d;
}
return NULL;
}
...
...
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