search for standard sites pub-search.waow.tech
search zig blog atproto

fix: set local DB ready immediately when re-syncing with existing data

f2c6d29 intended to keep local FTS serving during re-sync by only
calling setReady(false) on first-ever sync. But is_ready initializes
to false, so the has_data branch needed an explicit setReady(true).
Without it, every deploy caused ~60min of turso fallback (3-5s per
search) until fullSync completed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+1
+1
backend/src/db/sync.zig
··· 44 44 } else { 45 45 // re-sync: keep serving existing data while we refresh in-place 46 46 // INSERT OR REPLACE will update rows; stale data is acceptable 47 + local.setReady(true); 47 48 std.debug.print("sync: local has data, keeping ready during re-sync\n", .{}); 48 49 } 49 50