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) {
...
@@ -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
;
}
}
...
...
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