fix(sqlite-vfs): use delete range for truncate cleanup#4636
Conversation
PR Review: fix(sqlite-vfs): use delete range for truncate cleanupThis is a clean, targeted optimization that replaces manual chunk enumeration with a range delete in the SQLite VFS truncate path. Both implementations maintain parity per the CLAUDE.md requirement. What the change doesBefore: For truncation, the code built a list of individual chunk keys from After: A single CorrectnessRange boundary is safe. Semantically broader than old code, but intentionally so. The old code was bounded by Zero-size truncation works correctly. When Guard condition is correct. The Minor observationsRemoved comment in TypeScript. The old code had Pre-existing overflow concern (not introduced here). In Rust, No test changes. Correctness of range delete vs. batch delete is implementation-level; the observable behavior is identical. Existing truncation tests should cover this. No new tests needed solely for this refactor. SummaryStraightforward improvement: fewer allocations, fewer round-trips for large files, parity maintained between Rust and TypeScript. The logic is correct and the approach is consistent with how |
6eac78f to
4e380c8
Compare
4303e83 to
60882a2
Compare
4e380c8 to
7fbbf37
Compare
5f174d0 to
c75356d
Compare
7fbbf37 to
fe8cf4f
Compare
c75356d to
dfaae41
Compare
fe8cf4f to
2be63d0
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: