← Back to context

Comment by jpiasolutions

14 days ago

Same bug, two angles. Nothing really copies 20 pages, the "20" is just a broken counter. SQLite's internal tally of how many WAL pages it already saved to the main db gets corrupted and reads too high. Since it trusts that tally, it assumes those pages are already saved and skips writing them for real, so when the WAL resets they're gone. The "copied more than existed" number is the bug showing in your metrics; "pages never written" is the actual damage.