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

Function tryResizeHashTables

app/redis-6.2.6/src/server.c:1564–1569  ·  view source on GitHub ↗

If the percentage of used slots in the HT reaches HASHTABLE_MIN_FILL * we resize the hash table to save memory */

Source from the content-addressed store, hash-verified

1562/* If the percentage of used slots in the HT reaches HASHTABLE_MIN_FILL
1563 * we resize the hash table to save memory */
1564void tryResizeHashTables(int dbid) {
1565 if (htNeedsResize(server.db[dbid].dict))
1566 dictResize(server.db[dbid].dict);
1567 if (htNeedsResize(server.db[dbid].expires))
1568 dictResize(server.db[dbid].expires);
1569}
1570
1571/* Our hash table implementation performs rehashing incrementally while
1572 * we write/read from the hash table. Still if the server is idle, the hash

Callers 1

databasesCronFunction · 0.85

Calls 2

htNeedsResizeFunction · 0.85
dictResizeFunction · 0.85

Tested by

no test coverage detected