]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth lmdb: when broadcasting indexes, -do- rewrite them even if they are unchanged 13096/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 2 Aug 2023 12:35:32 +0000 (14:35 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 2 Aug 2023 13:25:52 +0000 (15:25 +0200)
ext/lmdb-safe/lmdb-typed.hh

index 3fcdcc74127b3365e44145df0a1645e5c520466f..790fead2910b8308aab63d97eea964ec70864036 100644 (file)
@@ -164,10 +164,8 @@ struct LMDBIndexOps
 
     MDBOutVal currentvalue;
 
-    // check if the entry already exists, so we don't uselessly bump the timestamp
-    if (txn->get(d_idx, combined, currentvalue) == MDB_NOTFOUND) {
-      txn->put(d_idx, combined, empty, flags);
-    }
+    // if the entry existed already, this will just update the timestamp/txid in the LS header. This is intentional, so objects and their indexes always get synced together.
+    txn->put(d_idx, combined, empty, flags);
   }
 
   void del(MDBRWTransaction& txn, const Class& t, uint32_t id)