]> granicus.if.org Git - pdns/commitdiff
auth: Move replaced meta/key entries to the back of the expunge queue
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 18 Apr 2019 08:05:51 +0000 (10:05 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 18 Apr 2019 08:05:51 +0000 (10:05 +0200)
Otherwise they might get expunged very quickly while they just have
been inserted.

pdns/dbdnsseckeeper.cc

index e4aa0b52821217f6dc738ce08c1de4206e2bafb8..4af74100310a540c1b5c669f6b4dcc17f452b825 100644 (file)
@@ -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);
     }
   }