MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / HashTableRehashMilliseconds

Function HashTableRehashMilliseconds

src/util/dict.c:333–344  ·  view source on GitHub ↗

Rehash in ms+"delta" milliseconds. The value of "delta" is larger * than 0, and is smaller than 1 in most cases. The exact upper bound * depends on the running time of dictRehash(d,100).*/

Source from the content-addressed store, hash-verified

331 * than 0, and is smaller than 1 in most cases. The exact upper bound
332 * depends on the running time of dictRehash(d,100).*/
333int HashTableRehashMilliseconds(dict *d, int ms) {
334 if (d->pauserehash > 0) return 0;
335
336 long long start = timeInMilliseconds();
337 int rehashes = 0;
338
339 while(HashTableRehash(d,100)) {
340 rehashes += 100;
341 if (timeInMilliseconds()-start > ms) break;
342 }
343 return rehashes;
344}
345
346/* This function performs just a step of rehashing, and only if hashing has
347 * not been paused for our hash table. When we have iterators in the

Callers

nothing calls this directly

Calls 2

timeInMillisecondsFunction · 0.85
HashTableRehashFunction · 0.85

Tested by

no test coverage detected