schema_version: 1
id: transaction-failure-during-concurrent-upsert
title: Transaction failure during concurrent upsert
status: draft
owner: codex
source: jira
environment:
  profile: stable-premium
  cluster_id: '10393794543881917049'
  cluster_type: premium
  tidb_version: unknown
time_window:
  incident_at: '2026-07-29T05:39:00Z'
  allowed:
  - id: reported_incident_window
    start: '2026-07-29T05:30:00Z'
    end: '2026-07-29T06:00:00Z'
prompt:
  text: 请分析 Premium 集群 10393794543881917049 在 2026-07-29T05:30:00Z 到 2026-07-29T06:00:00Z 的并发 upsert 失败。应用使用 Prisma upsert 更新已有行，并在 update 分支中重复写入未变化的主键；并发请求偶发返回 1105，错误中同时出现 foreign key cascade savepoint not found、Write conflict、PessimisticRetry 和 try again later。请判断根因、事务语义和可行的规避方式。
tags:
- transaction
- sql-error
- concurrency
case_tier: P0
cost_tier: medium
followup:
  scheduled_max_followups: 0
execution:
  acp_bash_timeout_s: 900
