scene_resolver._sync_tags used check-then-insert (select existing -> add if None), which races under concurrent ingest of the same scene: two runs both see existing=None, both add, flush -> IntegrityError pk_scene_tags (Sentry GOON-M, 4 events). Switched to pg_insert(...).on_conflict_do_nothing(index_elements=[scene_id, tag_id]) + in-batch dedup, identical to movie_resolver._sync_tags. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| movie_match.py | ||
| movie_resolver.py | ||
| movie_score.py | ||
| performer_resolver.py | ||
| scene_match.py | ||
| scene_merge.py | ||
| scene_resolver.py | ||
| scene_score.py | ||
| scoring.py | ||
| studio_resolver.py | ||
| studio_title_parser.py | ||
| tag_resolver.py | ||