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
cf6ed3fe
Unverified
Commit
cf6ed3fe
authored
Nov 09, 2023
by
zhaozhao.zz
Committed by
GitHub
Nov 09, 2023
Browse files
fix the wrong judgement for activerehashing in standalone mode (#12741)
Introduced by #11695, the judgement should be dictIsRehashing.
parent
53294e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
cf6ed3fe
...
@@ -692,13 +692,13 @@ int incrementallyRehash(int dbid) {
...
@@ -692,13 +692,13 @@ int incrementallyRehash(int dbid) {
}
else
{
}
else
{
/* Rehash main dict. */
/* Rehash main dict. */
dict
*
main_dict
=
server
.
db
[
dbid
].
dict
[
0
];
dict
*
main_dict
=
server
.
db
[
dbid
].
dict
[
0
];
if
(
main_dict
)
{
if
(
dictIsRehashing
(
main_dict
)
)
{
dictRehashMilliseconds
(
main_dict
,
INCREMENTAL_REHASHING_THRESHOLD_MS
);
dictRehashMilliseconds
(
main_dict
,
INCREMENTAL_REHASHING_THRESHOLD_MS
);
return
1
;
/* already used our millisecond for this loop... */
return
1
;
/* already used our millisecond for this loop... */
}
}
/* Rehash expires. */
/* Rehash expires. */
dict
*
expires_dict
=
server
.
db
[
dbid
].
expires
[
0
];
dict
*
expires_dict
=
server
.
db
[
dbid
].
expires
[
0
];
if
(
expires_dict
)
{
if
(
dictIsRehashing
(
expires_dict
)
)
{
dictRehashMilliseconds
(
expires_dict
,
INCREMENTAL_REHASHING_THRESHOLD_MS
);
dictRehashMilliseconds
(
expires_dict
,
INCREMENTAL_REHASHING_THRESHOLD_MS
);
return
1
;
/* already used our millisecond for this loop... */
return
1
;
/* already used our millisecond for this loop... */
}
}
...
...
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