fix(sync): keep scheduled sources on cadence under load - #956
salmonumbrella wants to merge 1 commit into
Conversation
roborev: Combined Review (
|
736fd4c to
5ea68f1
Compare
roborev: Combined Review (
|
5ea68f1 to
71233e5
Compare
roborev: Combined Review (
|
71233e5 to
34ec0b4
Compare
roborev: Combined Review (
|
33db9c5 to
5c130a8
Compare
roborev: Combined Review (
|
5c130a8 to
91e6b43
Compare
roborev: Combined Review (
|
c57bdae to
5804c20
Compare
roborev: Combined Review (
|
5804c20 to
80bb2a4
Compare
roborev: Combined Review (
|
80bb2a4 to
9310551
Compare
roborev: Combined Review (
|
9310551 to
98bf612
Compare
|
Addressed the confirmed problems in four follow-up commits:
Kept the author's new test for stopping during a conversation-count update. Refreshing Beeper's reference messages still waits for a completed cycle; every run checks saved or archived messages first. The full test suite ( |
roborev: Combined Review (
|
c2a1e3f to
98f7878
Compare
roborev: Combined Review (
|
98f7878 to
aae6e3d
Compare
roborev: Combined Review (
|
aae6e3d to
6a2d5ca
Compare
roborev: Combined Review (
|
6a2d5ca to
c70935b
Compare
roborev: Combined Review (
|
c70935b to
46ceba3
Compare
roborev: Combined Review (
|
46ceba3 to
61351f2
Compare
roborev: Combined Review (
|
61351f2 to
98e68d2
Compare
roborev: Combined Review (
|
98e68d2 to
a79441a
Compare
roborev: Combined Review (
|
a79441a to
cea0dc4
Compare
roborev: Combined Review (
|
cea0dc4 to
aff3efe
Compare
roborev: Combined Review (
|
aff3efe to
7dba29b
Compare
roborev: Combined Review (
|
7dba29b to
253cba0
Compare
roborev: Combined Review (
|
253cba0 to
dcb1471
Compare
roborev: Combined Review (
|
dcb1471 to
7dc6451
Compare
roborev: Combined Review (
|
What changed
attachment-packjob packs them every 6 hours. The dailyattachment-maintenancejob still packs and repacks.min_rebuild_intervalserves the existing publication and schedules the rebuild for when the interval ends. A failed automatic startup build keeps serving a usable publication, including underengine = "duckdb"./api/v1/scheduler/statusreportsqueued,pendingandstarted_at, and startup logs show the real next run instead of0001-01-01.sync-beeper --account <id>verifies again and clears the mark.sqlite-maintenancejob runsPRAGMA optimizeand a retriedwal_checkpoint(TRUNCATE). Gmail full syncs and calendar syncs use a passive checkpoint./api/v1/statsand/api/v1/cli/accountswait about 2 seconds for fresh counts, then serve the previous counts withstale: trueandas_of. Vector stats get their own 3-second deadline and setvector_stats_unavailableinstead of failing. Account counts come from one grouped query.The operation gate stays exclusive. Starvation is fixed by shortening and preempting holds, not by letting jobs write concurrently. Incremental pack discovery lives in
kit/packstoreand isn't part of this change.Why
On a large archive every scheduled job runs through one slot. Packing after each sync, inline cache rebuilds, lock waits and unbounded Beeper backfills each held it for minutes to hours, so a 5-minute schedule turned into a few syncs a day. Restarts and overlapping builds added repeated 16-minute builds that then failed.
Usage
No new configuration.
min_rebuild_intervalnow also applies at daemon startup. The new daemon jobs areattachment-pack(41 */6 * * *) andsqlite-maintenance(29 4 * * *).Closes #955