VACUUM snapshot metadata through the sqlite driver, not a CLI (closes #120)
check / check (pull_request) Failing after 1s
check / check (pull_request) Failing after 1s
snapshot create vacuumed the exported metadata database by shelling out to a sqlite3 binary, so a backup failed at the very end on any host without that CLI. vacuumDatabase now opens the database with the modernc.org/sqlite driver and runs VACUUM through it, outside any transaction; internal/snapshot no longer imports os/exec. The database opens in WAL mode, so the close after VACUUM checkpoints the rewrite into the main file that is compressed and uploaded. A new test deletes marked rows, vacuums, and asserts the file shrank and no longer holds the deleted bytes. script/bootstrap and the Dockerfile stop installing the CLI in both the test-build and the shipped runtime stage, so the image no longer carries the dependency this change removes. Model: opus-4-8
This commit is contained in:
@@ -25,6 +25,15 @@ release" is exactly the contradiction
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-21: Made `snapshot create` VACUUM the per-snapshot metadata
|
||||
database through the `modernc.org/sqlite` driver instead of shelling
|
||||
out to the external `sqlite` command-line binary (issue #120). A
|
||||
backup no longer needs that binary on `PATH`, so `make check` passes
|
||||
on a stock `go install` host; `script/bootstrap` and the `Dockerfile`
|
||||
(both the test-build and the shipped runtime stage) no longer install
|
||||
it, and a new test asserts the uploaded database keeps no pages from
|
||||
deleted rows. Dropped the now-false note on the 2026-08-07 entry below
|
||||
that said bootstrap installs it.
|
||||
- 2026-09-21: Made `.gitea/workflows/check.yml` run on pushes to `main`
|
||||
and `next` and on pull requests against either, so unit PRs (whose
|
||||
base is `next`) and `next` itself get a CI run instead of relying on a
|
||||
@@ -529,7 +538,7 @@ release" is exactly the contradiction
|
||||
was green was wrong.
|
||||
- 2026-08-07: Added the standard `.golangci.yml` and `.editorconfig`
|
||||
(issue #59); lint findings under the new config are tracked in issue
|
||||
#61. `script/bootstrap` now installs sqlite3 (needed by tests).
|
||||
#61.
|
||||
- 2026-07-07 Adopted scripts-to-rule-them-all: `script/` entrypoints,
|
||||
Makefile shims, README Entrypoints section
|
||||
- 2026-07-02: Consolidated CLI verbs, retired overlapping commands; bound
|
||||
|
||||
Reference in New Issue
Block a user