]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add comments
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 2 May 2023 12:13:16 +0000 (14:13 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 2 May 2023 12:13:16 +0000 (14:13 +0200)
ext/lmdb-safe/lmdb-typed.hh
modules/lmdbbackend/lmdbbackend.cc

index a48c3af01072aad7e580063a21ab6fb732c38b1b..ad5bb07c8a788c778535d8a6558ec1c3c1fc2429 100644 (file)
@@ -310,6 +310,7 @@ public:
       // auto range = prefix_range<N>(key);
       LMDBIDvec ids;
 
+      // because we know we only want one item, pass onlyOldest=true to consistently get the same one out of a set of duplicates
       get_multi<N>(key, ids, true);
 
       if (ids.size() == 0) {
index 88cde13a1e51d896e3324881b7dc1256a0f74ba7..219521978f3c1e340c115d75ff072adc8762a9b5 100644 (file)
@@ -1679,6 +1679,7 @@ void LMDBBackend::getAllDomainsFiltered(vector<DomainInfo>* domains, const std::
     for (const auto& zone : dups) {
       DomainInfo di;
 
+      // this get grabs the oldest item if there are duplicates
       if (!(di.id = txn.get<0>(zone, di))) {
         continue;
       }