Skip to content

Fix DBPrivClean() for LMDB 1.0.0 mdb_drop() semantics#6235

Draft
aleksandrychev wants to merge 1 commit into
cfengine:masterfrom
aleksandrychev:lmbd_fix
Draft

Fix DBPrivClean() for LMDB 1.0.0 mdb_drop() semantics#6235
aleksandrychev wants to merge 1 commit into
cfengine:masterfrom
aleksandrychev:lmbd_fix

Conversation

@aleksandrychev

Copy link
Copy Markdown
Contributor

LMDB 1.0.0 changed mdb_drop(): emptying the main DBI marks the transaction MDB_TXN_DROPPED, so any subsequent read/write on that same transaction fails with MDB_BAD_TXN. CFEngine reuses one write transaction per thread and callers typically repopulate the DB right after cleaning it, which triggered the failure.

LMDB 1.0.0 changed mdb_drop(): emptying the main DBI marks the
transaction MDB_TXN_DROPPED, so any subsequent read/write on that
same transaction fails with MDB_BAD_TXN. CFEngine reuses one write
transaction per thread and callers typically repopulate the DB right
after cleaning it, which triggered the failure.

Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant