From: Remi Gacogne Date: Thu, 18 Apr 2019 08:05:51 +0000 (+0200) Subject: auth: Move replaced meta/key entries to the back of the expunge queue X-Git-Tag: rec-4.2.0-beta1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7730%2Fhead;p=thirdparty%2Fpdns.git auth: Move replaced meta/key entries to the back of the expunge queue Otherwise they might get expunged very quickly while they just have been inserted. --- diff --git a/pdns/dbdnsseckeeper.cc b/pdns/dbdnsseckeeper.cc index e4aa0b5282..4af7410031 100644 --- a/pdns/dbdnsseckeeper.cc +++ b/pdns/dbdnsseckeeper.cc @@ -224,7 +224,7 @@ void DNSSECKeeper::getFromMeta(const DNSName& zname, const std::string& key, std nce.d_value = value; { WriteLock l(&s_metacachelock); - replacing_insert(s_metacache, nce); + lruReplacingInsert(s_metacache, nce); } } } @@ -514,7 +514,7 @@ DNSSECKeeper::keyset_t DNSSECKeeper::getKeys(const DNSName& zone, bool useCache) kce.d_ttd = now + ttl; { WriteLock l(&s_keycachelock); - replacing_insert(s_keycache, kce); + lruReplacingInsert(s_keycache, kce); } }