Skip to content

Commit

Permalink
Merge pull request #13096 from Habbie/lmdb-do-reset-index-timestamp
Browse files Browse the repository at this point in the history
auth lmdb: when broadcasting indexes, -do- rewrite them even if they are unchanged
  • Loading branch information
Habbie authored Aug 3, 2023
2 parents d8839e9 + e0e59b3 commit f8fb9ff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/lmdb-safe/lmdb-typed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f8fb9ff

Please sign in to comment.