Commit 91a4cb4
committed
feat: Disable wal_autocheckpoint
From https://www.sqlite.org/wal.html:
> The default strategy is to allow successive write transactions to grow the WAL until the WAL
becomes about 1000 pages in size, then to run a checkpoint operation for each subsequent COMMIT
until the WAL is reset to be smaller than 1000 pages. By default, the checkpoint will be run
automatically by the same thread that does the COMMIT that pushes the WAL over its size
limit. This has the effect of causing most COMMIT operations to be very fast but an occasional
COMMIT (those that trigger a checkpoint) to be much slower.
And while autocheckpoint runs in the `PASSIVE` mode and thus doesn't block concurrent readers and
writers, in our design it blocks writers because it's done under `write_mutex` locked and thus may
cause the app to stuck for noticeable time. Let's disable autocheckpointing then, we can't rely on
it anyway.1 parent b696a24 commit 91a4cb4
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
0 commit comments