Repository navigation
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LMDB 1.0 stores a database name's terminating null byte in the root DBI key, while 0.9 stores the bare name. Strip it (and require it as a validity check) when listing databases. The total-used-space scan now also skips non-DBI records and OpenDBI errors instead of accidentally including free list stats via DBI 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Opens the environment with lmdb.PrevSnapshot to inspect the state as of the previous commit, e.g. when the latest transaction is corrupted. The footer indicates when the previous snapshot is shown. Since lmdbnav always opens readonly, the rollback never becomes permanent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This makes remote 'go install' work again. Also document installation for users unfamiliar with Go development. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ive" This reverts commit 11346b0.
Restores the installation instructions, now noting that remote 'go install' does not work while the replace directive is present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Status: WIP — do not merge
Depends on the unreleased lmdb-go v2 (PowerDNS/lmdb-go#42). Until v2 is published,
go.modcarries a temporary replace directive pointing at the development fork:While the replace is present, remote
go installof this branch is not possible; install from a source checkout (the README notes this). Before this can merge: lmdb-go v2 must be tagged, the replace dropped, and the requirement pinned to the released version.Changes
github.com/PowerDNS/lmdb-go/v2— drop-in apart from the import path. With v2, lmdbnav transparently opens both LMDB 0.9- and 1.0-format databases (engine selected per environment by sniffing the data file). Also bumpsgo 1.17→go 1.21(required by v2).Env.EngineVersion), e.g.LMDB 1.0.0 | MapSize …, so it's always visible which engine is driving the opened database.Env.Format), which doubles as an extra validity filter on 1.0. Verified that the 48-byteMDB_dbrecord check remains valid for both formats (identical struct layout).OpenDBIerrors (accidentally including free-list stats via DBI handle 0) and had no record filter; it now skips non-DBI entries like the databases view does.--prev-snapshotflag (LMDB 1.0 only) — opens the environment one commit back via the newlmdb.PrevSnapshot, for inspecting databases whose latest transaction is corrupted. The footer shows(prev snapshot); a 0.9 database fails with a clear error. Safe by construction: lmdbnav always opens readonly, so the rollback never becomes permanent.go install, PATH/GOBIN), with a note that installs must come from a source checkout while the replace directive is in place.go vetwarning (%winlog.Printf).Testing
Verified against generated 0.9- and 1.0-format test databases: database listing, browsing, footer stats, engine version display, and
--prev-snapshot(previous state shown, footer indicator, 0.9 error path). Install from a source checkout verified.🤖 Generated with Claude Code