mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
refactor(server): collapse duplicated sync stream handlers
The sync service hand-rolled the same delete/upsert/backfill/create stream loops across ~27 per-entity handlers. Extract four typed helpers on SyncService — streamDeletes, streamUpserts (overloaded, optional map), streamBackfill, and streamCreates — and rewrite each handler to call them. Behavior is unchanged: the per-parent backfill bookkeeping (isEntityBackfillComplete / getStartId / completion acks / checkpoint seeding) and the create-stream's one-time ack are preserved exactly, and the OCR delete keeps its whole-row payload. Verified by the sync medium test suite (26 files, 145 tests) plus tsc and eslint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0ff47f4178
commit
bd967ce5e4
1 changed files with 413 additions and 511 deletions
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue