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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca8f16212f01fe99f4bf78812d7686e87be11e41;p=pdns 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 e4aa0b528..4af741003 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); } }