]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Clean up expired entries from all the packet cache's shards
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 2 Mar 2021 16:50:54 +0000 (17:50 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 2 Mar 2021 16:50:54 +0000 (17:50 +0100)
commitf6e76e12e6acfa2ff42ccaefdcfda02be5340d8d
treeb470df992b3142b189003b3a827b1f0a6c1f42d8
parenteb4a5556fc755c151c02b362c7519a480256c968
dnsdist: Clean up expired entries from all the packet cache's shards

Otherwise we might remove enough entries from the first shards only
and stop there, which means that the other shards might remain full.
This might be fine if we clean up often enough since the next cleaning
run will start with the remaining shards, but that's sub-optimal when
we are often nearly full because it will prevent new entries from being
inserted in the shards that are full.
pdns/dnsdist-cache.cc
pdns/dnsdist-cache.hh
pdns/dnsdist.cc
pdns/dnsdistdist/dnsdist-lua-bindings-packetcache.cc
pdns/test-dnsdistpacketcache_cc.cc