MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _dictRehashStep

Function _dictRehashStep

app/redis-6.2.6/src/dict.c:287–289  ·  view source on GitHub ↗

This function performs just a step of rehashing, and only if hashing has * not been paused for our hash table. When we have iterators in the * middle of a rehashing we can't mess with the two hash tables otherwise * some element can be missed or duplicated. * * This function is called by common lookup or update operations in the * dictionary so that the hash table automatically migrates from

Source from the content-addressed store, hash-verified

285 * dictionary so that the hash table automatically migrates from H1 to H2
286 * while it is actively used. */
287static void _dictRehashStep(dict *d) {
288 if (d->pauserehash == 0) dictRehash(d,1);
289}
290
291/* Add an element to the target hash table */
292int dictAdd(dict *d, void *key, void *val)

Callers 5

dictAddRawFunction · 0.85
dictGenericDeleteFunction · 0.85
dictFindFunction · 0.85
dictGetRandomKeyFunction · 0.85
dictGetSomeKeysFunction · 0.85

Calls 1

dictRehashFunction · 0.85

Tested by

no test coverage detected