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
f39c9404
Unverified
Commit
f39c9404
authored
Aug 10, 2020
by
Jim Brunner
Committed by
GitHub
Aug 10, 2020
Browse files
Prevent dictRehashMilliseconds from rehashing while a safe iterator is present (#5948)
parent
229327ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dict.c
View file @
f39c9404
...
@@ -239,6 +239,8 @@ long long timeInMilliseconds(void) {
...
@@ -239,6 +239,8 @@ long long timeInMilliseconds(void) {
/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */
/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */
int
dictRehashMilliseconds
(
dict
*
d
,
int
ms
)
{
int
dictRehashMilliseconds
(
dict
*
d
,
int
ms
)
{
if
(
d
->
iterators
>
0
)
return
0
;
long
long
start
=
timeInMilliseconds
();
long
long
start
=
timeInMilliseconds
();
int
rehashes
=
0
;
int
rehashes
=
0
;
...
...
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