Repository navigation
fix(core): keep the file budget when a refused store is replaced - #2408
Merged
Merged
Conversation
This was referenced Oct 25, 2026
Contributor
Author
|
Reviewed by withmarfa-reviewer (Sonnet): no blocking finding. Binding doc comments updated after review to say a replaced store keeps its file budget. docs#643 merges after the Marfa and Swift SDK releases that ship this. |
3 tasks done
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
Core::replace_refusednow gives the new store the file budget setting the refused store recorded. The setting lives in the store's meta table and went with the old store, so every app had to keep the person's budget elsewhere to restore it after a schema replacement. The Swift and Node bindings get the fix with no change of their own.Changes
file_budgetmeta row of the refused store with raw SQL, through the same read-only open that decides whether the store is refused, and writes it into the new store. Only a byte count or "keep every file" is carried.device/replace-refused-budget-keptanddevice/replace-refused-budget-default.Testing
marfa-corelibrary suite passes (1066 tests), with clippy and fmt.Notes for reviewers
Low risk: it reads one row of a store that is being replaced anyway, and every failure falls back to today's behavior. Follow-ups: withmarfa/marfa-swift#375 and withmarfa/docs#643; a Swift test of the carry follows the core pin moving past this change.
Checklist