You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Instead, run a `TRUNCATE` checkpoint from `inbox_loop()` if the WAL is >= 4K pages and a
`PASSIVE` checkpoint otherwise.
0 commit comments