Preserve LMDB databases across an on-disk format change - #2405
Open
nickanderson wants to merge 1 commit into
Open
Preserve LMDB databases across an on-disk format change#2405nickanderson wants to merge 1 commit into
nickanderson wants to merge 1 commit into
Conversation
nickanderson
force-pushed
the
CFE-4701/master
branch
from
August 6, 2026 16:50
49ebec9 to
a6d30c9
Compare
LMDB 1.0 cannot read databases written by 0.9, and reports them as MDB_INVALID, which CFEngine treats as corruption and deletes. Export the databases in the preinstall script while the old mdb_dump is still installed, and import them again in the postinstall script. Ticket: CFE-4701 Changelog: LMDB databases in the state directory are now preserved when upgrading across an LMDB on-disk format change, instead of being discarded as corrupt
nickanderson
force-pushed
the
CFE-4701/master
branch
from
August 6, 2026 19:42
a6d30c9 to
dc40264
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dumps the LMDB databases in the preinstall script using the old
mdb_dumpand reloads them in the postinstall script using the newmdb_load, so upgrading across an LMDB on-disk format change no longer leaves them looking corrupt and gets them deleted. Gated on aLMDB_VERSIONcomparison, so it is a no-op unless the major.minor series actually changes.Ticket: CFE-4701
🤖 Generated with Claude Code