benbjohnson / litestream

Streaming replication for SQLite.
https://litestream.io
Apache License 2.0
11.12k stars 256 forks source link

Only update litestream_seq if size is below WAL header size #573

Open benbjohnson opened 8 months ago

benbjohnson commented 8 months ago

Previously, the litestream_seq could increment on a PASSIVE checkpoint even if the WAL existed and did not need to be created. This caused a loop where the increment would trigger replication. This PR fixes this by only executing the increment if the WAL is below a size threshold.

Fixes #422