fix(sqlite-native): delete metadata before chunk range#4638
Conversation
|
The ordering fix is correct: deleting metadata before chunks is the safer crash-safety posture. If a crash occurs after metadata is deleted but before chunks are removed, the chunks become orphaned but no reader will follow a dangling reference to missing data. The reverse ordering (old behavior) leaves a valid metadata key pointing to deleted chunks, which risks corruption on the next read. This PR fixes the Rust side but leaves the TypeScript WASM VFS with the original chunk-first ordering. The fix needs to be applied there too to satisfy the required parity and close the same crash-safety gap on the WASM path. The template body was left blank. A one-line note on why the order matters would help reviewers. The Rust change itself is a sound fix. Two gaps to address: (1) WASM VFS still deletes chunks before metadata - needs the same reordering to maintain required VFS parity. (2) PR description was left blank. |
12c0baa to
61b5457
Compare
459dd12 to
d7b2c43
Compare
61b5457 to
bc7e3d7
Compare
d7b2c43 to
6c17fae
Compare
bc7e3d7 to
49fae2b
Compare
492ff0c to
244fffb
Compare
51a4f79 to
52d1073
Compare
52d1073 to
d13eb68
Compare
244fffb to
08b0d37
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: