From e0e59b3868b4caf7a2e4f93e6d8a802b8d83eccd Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Wed, 2 Aug 2023 14:35:32 +0200 Subject: [PATCH] auth lmdb: when broadcasting indexes, -do- rewrite them even if they are unchanged --- ext/lmdb-safe/lmdb-typed.hh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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) -- 2.47.2