fix(batch-dedup): don't crash on FK violation in _write_review

Stale UUIDs in the Qdrant dedup collection can reference controls
that were deprecated in earlier batches. Log warning and continue
instead of raising and killing the entire job.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-22 13:25:28 +02:00
parent 932508f935
commit fc855f52f9

View File

@@ -606,9 +606,9 @@ class BatchDedupRunner:
}) })
self.db.commit() self.db.commit()
except Exception as e: except Exception as e:
logger.error("BatchDedup _write_review error: %s", e) logger.warning("BatchDedup _write_review skipped (FK or other error): %s", e)
self.db.rollback() self.db.rollback()
raise self.stats["errors"] += 1
# ── Progress ───────────────────────────────────────────────────────── # ── Progress ─────────────────────────────────────────────────────────