docs(cayenne): metastore auto_vacuum defaults to incremental, and a bare VACUUM cannot migrate an existing file - #2139
Merged
Conversation
… a bare VACUUM cannot migrate an existing file
Contributor
✅ Pull with Spice PassedPassing checks:
|
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
1 similar comment
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
Contributor
|
🚀 deployed to https://56b029fc.spiceai-org-website.pages.dev |
Collaborator
Author
|
@copilot review |
Contributor
Reviewed the current PR changes. No high-confidence issues were found that require code changes. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Corrects Cayenne metastore auto-vacuum defaults and migration guidance across current and versioned documentation.
Changes:
- Documents the vNext
incrementaldefault and fallback behavior. - Replaces bare
VACUUMguidance with the required pragma sequence.
File summaries
| File | Description |
|---|---|
website/docs/.../cayenne/index.md |
Updates current behavior and migration steps. |
website/versioned_docs/version-2.0.x/.../index.md |
Corrects migration guidance. |
website/versioned_docs/version-2.1.x/.../index.md |
Corrects migration guidance. |
website/versioned_docs/version-2.2.x/.../index.md |
Corrects migration guidance. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…s involving none SQLite only fixes auto_vacuum irreversibly across the none boundary. Measured on SQLite 3.51.0: PRAGMA auto_vacuum takes effect on its own when switching an existing file between full and incremental, while every transition to or from none needs a VACUUM after the pragma. The blanket 'an existing database always needs a full VACUUM' rule therefore overstates the downtime a mode change costs on a large metastore. Also links the SQLite auto_vacuum reference so the file-format and VACUUM requirements are verifiable from the page.
Contributor
|
🚀 deployed to https://ba58a7d9.spiceai-org-website.pages.dev |
lukekim
approved these changes
Sep 1, 2026
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.
Summary
Two wrong claims in the
cayenne_metastore_auto_vacuumrow of the Cayenneruntime.paramstable.1. The default is no longer
none(vNext). spiceai/spiceai#13651 flippedSqliteMetastoreConfig::default().auto_vacuumfromSqliteAutoVacuum::NonetoSqliteAutoVacuum::Incremental(crates/cayenne/src/metastore/sqlite.rs, asserted bytest_auto_vacuum_defaults_to_incremental). The docs still sayDefaults to none, which inverts what a stock runtime does: incremental page reclamation is now on by default, and the accompanyingcayenne_metastore_incremental_vacuum_pagescap (already documented) is what bounds each write-lock hold. The same row's "An unrecognized value logs a warning and falls back tonone" is wrong for the same reason —crates/runtime/src/builder.rsleavesmetastore_cfg.auto_vacuumon whatever theDefaultimpl holds, and the warning itself says "Keeping the default".git tag --contains 00cbd761e3returns nothing, so this half is vNext-only:version-2.0.x,version-2.1.xandversion-2.2.xcorrectly documentnone(v2.2.0still shipsauto_vacuum: SqliteAutoVacuum::None).2. The migration sequence is a no-op in every version. All four snapshots said an existing database "needs a full
VACUUMto change it". A bareVACUUMpreserves whateverauto_vacuummode the file already has — moving an existing metastore offnonetakesPRAGMA auto_vacuum = <mode>and then a fullVACUUM. An operator following the published guidance would run aVACUUM, see the mode unchanged, and have no way to tell why. That correction applies to every version, so it lands in all four files.The runtime now warns at startup when it opens a metastore created under the old
nonedefault, and that warning links to this page — which, before this PR, told the reader the opposite of what the warning says.What changed
incremental; unrecognized-value fallback corrected to "keeps theincrementaldefault"; the real migration sequence (PRAGMA auto_vacuum = INCREMENTAL; VACUUM;, with the runtime's startup warning noted) replaces the bare-VACUUMguidance.version-2.0.x/version-2.1.x/version-2.2.x: default left atnone(correct for those releases); only the migration sequence corrected.Source refs
fix(cayenne): reclaim inline tombstones, and return the freed metastore pages(commit00cbd761e3, 2026-08-28, no release tag)crates/cayenne/src/metastore/sqlite.rs—impl Default for SqliteMetastoreConfig, theauto_vacuumfield doc, and the legacy-metastore startup warningcrates/runtime/src/builder.rs—CAYENNE_METASTORE_AUTO_VACUUM_PARAMparsing (invalid value → keep default)Test plan
cd website && npm run buildpassesgrep -rn "an existing database needs a full" docs/ versioned_docs/returns 0 hits;cayenne_metastore_auto_vacuumappears in exactly these 4 files