FAA sync parallelism cleanup

fix

2026-01-09 · stayairworthy

Spent the day untangling the FAA registry sync after it kept eating itself in parallel. Swapped the per-row manufacturer inserts for a batched ON CONFLICT DO NOTHING in chunks of 500, which turns 68K individual round trips into something the database doesn't resent. Then chased deadlocks through the model creation path: atomic array_append for alias updates, a retry-with-backoff loop on the per-item commit, and a unique-violation catch that re-fetches whatever the other Lambda just created. Also gated LLM matching to manufacturers with at least three aircraft so the rare ones stop fighting over locks, and fixed a date parser in the cleanup step that was being too clever with hyphens and colons.

6 commits across 1 repo (savvyai: 6). 2 files changed.