mirror of https://mirror.osredm.com/root/redis.git
Prevent dictRehashMilliseconds from rehashing while a safe iterator is present (#5948)
This commit is contained in:
parent
229327ad8b
commit
f39c9404a3
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue