]> git.ipfire.org Git - thirdparty/bind9.git/commit
Several serve-stale improvements
authorKevin Chen <kchen@mit.edu>
Thu, 11 Mar 2021 14:45:44 +0000 (15:45 +0100)
committerEvan Hunt <each@isc.org>
Sun, 30 May 2021 18:45:35 +0000 (11:45 -0700)
commit0cdf85d20491eca328ed43f8c3f70513735757ba
treefd0f614f1553f0196c524335d1bc0e664d32051f
parentfc1e3efc414a2571d33fe01f3509408fbe9848ee
Several serve-stale improvements

Commit a83c8cb0afd88d54b9cf67239f2495c9b0391e97 updated masterdump so
that stale records in "rndc dumpdb" output no longer shows 0 TTLs.  In
this commit we change the name of the `rdataset->stale_ttl` field to
`rdataset->expired` to make its purpose clearer, and set it to zero in
cases where it's unused.

Add 'rbtdb->serve_stale_ttl' to various checks so that stale records
are not purged from the cache when they've been stale for RBTDB_VIRTUAL
(300) seconds.

Increment 'ns_statscounter_usedstale' when a stale answer is used.

Note: There was a question of whether 'overmem_purge' should be
purging ancient records, instead of stale ones.  It is left as purging
stale records, since stale records could take up the majority of the
cache.

This submission is copyrighted Akamai Technologies, Inc. and provided
under an MPL 2.0 license.

This commit was originally authored by Kevin Chen, and was updated by
Matthijs Mekking to match recent serve-stale developments.
lib/dns/include/dns/rdataset.h
lib/dns/masterdump.c
lib/dns/rbtdb.c
lib/ns/query.c