test: require opt-in LMDB map auto-growth #14

Open
nsaspy wants to merge 2 commits from db/lmdb-auto-grow-red-20260831 into master
Owner

RED-first slice for #10

This PR intentionally contains the regression before production code.

The fixture opens a deliberately small LMDB environment with :auto-grow t, writes a value larger than the initial map, requires db-max-size to increase, then closes/reopens and verifies the value remains durable.

Current master has no :auto-grow constructor setting, so exact-head tests are expected to fail for the missing behavior. A broken environment or unrelated failure does not count as RED.

Important implementation constraint

Do not obtain GREEN by merely catching LMDB-MAP-FULL-ERROR around the existing transaction closure. Several current write paths resolve/capture LMDB DBI handles before entering with-database; closing/reopening the environment would make those captured handles stale. The eventual grow/retry boundary must reacquire DBIs before replaying the complete logical top-level write.

Issue: #10

## RED-first slice for #10 This PR intentionally contains the regression before production code. The fixture opens a deliberately small LMDB environment with `:auto-grow t`, writes a value larger than the initial map, requires `db-max-size` to increase, then closes/reopens and verifies the value remains durable. Current `master` has no `:auto-grow` constructor setting, so exact-head tests are expected to fail for the missing behavior. A broken environment or unrelated failure does not count as RED. ## Important implementation constraint Do not obtain GREEN by merely catching `LMDB-MAP-FULL-ERROR` around the existing transaction closure. Several current write paths resolve/capture LMDB DBI handles before entering `with-database`; closing/reopening the environment would make those captured handles stale. The eventual grow/retry boundary must reacquire DBIs before replaying the complete logical top-level write. Issue: #10
test: wire LMDB auto-growth RED
Some checks failed
CI / tests (ubuntu-22.04) (pull_request) Failing after 5m6s
CI / tests (ubuntu-24.04) (pull_request) Failing after 6m13s
CI / package-smoke (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / merge-gate (pull_request) Failing after 1s
c5c170e262
Some checks failed
CI / tests (ubuntu-22.04) (pull_request) Failing after 5m6s
CI / tests (ubuntu-24.04) (pull_request) Failing after 6m13s
CI / package-smoke (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / merge-gate (pull_request) Failing after 1s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin db/lmdb-auto-grow-red-20260831:db/lmdb-auto-grow-red-20260831
git switch db/lmdb-auto-grow-red-20260831

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff db/lmdb-auto-grow-red-20260831
git switch db/lmdb-auto-grow-red-20260831
git rebase master
git switch master
git merge --ff-only db/lmdb-auto-grow-red-20260831
git switch db/lmdb-auto-grow-red-20260831
git rebase master
git switch master
git merge --no-ff db/lmdb-auto-grow-red-20260831
git switch master
git merge --squash db/lmdb-auto-grow-red-20260831
git switch master
git merge --ff-only db/lmdb-auto-grow-red-20260831
git switch master
git merge db/lmdb-auto-grow-red-20260831
git push origin master
Sign in to join this conversation.
No description provided.