Excessive rehashing adds latency
Former-commit-id: ee5a4528d61420a18f89a07f4ac63e2181a19738
This commit is contained in:
parent
15d9f45b4e
commit
2e3fd28dcb
@ -546,7 +546,7 @@ int dictRehashMilliseconds(dict *d, int ms) {
|
||||
static void _dictRehashStep(dict *d) {
|
||||
unsigned iterators;
|
||||
__atomic_load(&d->iterators, &iterators, __ATOMIC_RELAXED);
|
||||
if (iterators == 0) dictRehash(d,2);
|
||||
if (iterators == 0) dictRehash(d,1);
|
||||
}
|
||||
|
||||
/* Add an element to the target hash table */
|
||||
|
Loading…
x
Reference in New Issue
Block a user