Repository navigation
fix(sqlite): recover snapshots after killed rollback writers - #113580
Merged
Merged
Conversation
vincentkoc
force-pushed
the
fix/sqlite-state-durability-20260725
branch
from
July 25, 2026 08:29
f57a68b to
39c15a1
Compare
vincentkoc
marked this pull request as ready for review
July 25, 2026 08:34
vincentkoc
force-pushed
the
fix/sqlite-state-durability-20260725
branch
from
July 25, 2026 08:36
39c15a1 to
bae3a77
Compare
Member
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 26, 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.
Related: #113306
What Problem This Solves
Fixes an issue where operators creating a SQLite backup after an abrupt process kill could see snapshot creation fail when the source retained a hot rollback journal, even though SQLite could safely recover the committed state.
Why This Change Was Made
Snapshot reads continue to prefer SQLite's online backup protocol. When SQLite specifically rejects a read-only open and a rollback journal is still present, OpenClaw now copies a stable database/journal pair into a private directory and lets SQLite recover only that copy. The source database family remains byte-for-byte untouched, races retry once, and multi-database super-journal residue fails closed instead of risking incomplete cross-database recovery.
User Impact
Backups can capture the last committed state after a killed rollback-journal writer without requiring a writable recovery open or modifying the live database files. Unsafe multi-database crash residue returns an explicit error.
Evidence
tbx_01kyc5s73srg4vk49f4ec2ramh, Actions run 30150931566:SIGKILLhot-journal snapshot recovery passed.pnpm check:changedpassed forcore,coreTests, anddocs, including formatting, typechecks, lint, and database-first guards.git diff --checkpassed.