4 Commits
Author SHA1 Message Date
yeuimu c545c1b87d fix: 写库并发控制(advisory锁串行写+分批提交+lock_timeout+死锁重试), refresh_pending写任务加重试
死锁根因:sds-refresh-pending 与 label-ocr 整点并发写同一分区 Orders_2026_08,
互等对方未提交事务(ShareLock)。24h 内同类死锁 7 起。
- sync_orders_and_goods 所有写事务先取同一把 PG advisory 锁(事务级),单锁无环,死锁结构性消除
- 同步按批(1000单)独立提交,持锁窗口从整个 pending 集缩到单批
- 连接预设 lock_timeout=15s,DeadlockDetected/LockNotAvailable 整事务重试 3 次(退避1/3/7s)
- label-ocr 的 update_ocr_batch/update_ocr_fields 走同一把锁+重试
- sds/riin refresh_pending 的 upsert_records 加任务级重试(retries=3)
2026-09-02 03:23:02 +00:00
yeuimu a742f4169e feat: label-ocr 默认 GB+US 近7天; refresh_pending 合并无面单订单(近7天) 2026-07-31 01:57:52 +00:00
yeuimu 4ec7cf2dd6 feat: 详细日志(分页/映射/批次进度)+ Artifacts 摘要(sync-summary/verify-report) 2026-07-23 09:01:39 +00:00
yeuimu 4cba1da4e1 init: Prefect ETL sync project (RIIN/SDS → PG) with 12 sync flows 2026-07-23 08:13:09 +00:00