Execution #296

Job IDmanual
Job NameDeal标记
Task Typedatagen_deals
Region--
Statusfailed
Start Time2026-04-12 11:21:18
End Time2026-04-12 11:21:22
Duration4.6s
Parameters{}

Error

(psycopg2.errors.DeadlockDetected) deadlock detected
DETAIL:  Process 16058 waits for ShareLock on transaction 1264005; blocked by process 14601.
Process 14601 waits for ShareLock on transaction 1264011; blocked by process 16058.
HINT:  See server log for query details.
CONTEXT:  while updating tuple (6298,9) in relation "content_product"

[SQL: 
                UPDATE content_product SET is_deal = true, updated_at = now()
                WHERE is_active = true AND original_price > price AND original_price > 0
                    AND discount_rate >= %(min_dr)s
                    AND (is_manual_fix = false OR is_manual_fix IS NULL)
            ]
[parameters: {'min_dr': 0.05}]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

Log Output

19:21:19 | INFO | [Discount] 完成: 修复=5, 无效DR修复=0
19:21:21 | ERROR | 任务 [Deal标记] 执行失败: (psycopg2.errors.DeadlockDetected) deadlock detected
DETAIL:  Process 16058 waits for ShareLock on transaction 1264005; blocked by process 14601.
Process 14601 waits for ShareLock on transaction 1264011; blocked by process 16058.
HINT:  See server log for query details.
CONTEXT:  while updating tuple (6298,9) in relation "content_product"

[SQL: 
                UPDATE content_product SET is_deal = true, updated_at = now()
                WHERE is_active = true AND original_price > price AND original_price > 0
                    AND discount_rate >= %(min_dr)s
                    AND (is_manual_fix = false OR is_manual_fix IS NULL)
            ]
[parameters: {'min_dr': 0.05}]
(Background on this error at: https://sqlalche.me/e/20/e3q8)