mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 20:44:23 +01:00
Closes #1622 I did an A/B test between SQLite and Limbo and they can restart the db from each other, indicating that there isn't something very wrong with our file format. Turns out it was with our reset logic without truncating the file. I assumed it's safe to don't reset if we're in `PASSIVE` mode, given the [docs](https://www.sqlite.org/c3ref/wal_checkpoint_v2.html) and [source code](https://github.com/sqlite/sqlite/blob/2bd9f69d40dd240c4122c6d02f1f f447e7b5c098/src/wal.c#L2193). It also does some small clean ups and fixes. Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #1647