From: Peter van Dijk Date: Wed, 2 Aug 2023 12:35:32 +0000 (+0200) Subject: auth lmdb: when broadcasting indexes, -do- rewrite them even if they are unchanged X-Git-Tag: rec-5.0.0-alpha1~73^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13096%2Fhead;p=thirdparty%2Fpdns.git auth lmdb: when broadcasting indexes, -do- rewrite them even if they are unchanged --- diff --git a/ext/lmdb-safe/lmdb-typed.hh b/ext/lmdb-safe/lmdb-typed.hh index 3fcdcc7412..790fead291 100644 --- a/ext/lmdb-safe/lmdb-typed.hh +++ b/ext/lmdb-safe/lmdb-typed.hh @@ -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)