mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Allow resetting hash table size limits for DNS DBs
When "max-cache-size" is changed to "unlimited" (or "0") for a running named instance (using "rndc reconfig"), the hash table size limit for each affected cache DB is not reset to the maximum possible value, preventing those hash tables from being allowed to grow as a result of new nodes being added. Extend dns_rbt_adjusthashsize() to interpret "size" set to 0 as a signal to remove any previously imposed limits on the hash table size. Adjust API documentation for dns_db_adjusthashsize() accordingly. Move the call to dns_db_adjusthashsize() from dns_cache_setcachesize() so that it also happens when "size" is set to 0.
This commit is contained in:
@@ -957,8 +957,9 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
|
||||
* time, or replacing other limits).
|
||||
*/
|
||||
isc_mem_setwater(cache->mctx, water, cache, hiwater, lowater);
|
||||
dns_db_adjusthashsize(cache->db, size);
|
||||
}
|
||||
|
||||
dns_db_adjusthashsize(cache->db, size);
|
||||
}
|
||||
|
||||
size_t
|
||||
|
Reference in New Issue
Block a user