You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: concurrent mixed DATA BRANCH workflows deadlock across independent databases #26404
This issue requires human involvement and cannot currently be completed independently by the
automated fix loop.
Reason
Requires Data Branch/lock-service owners to define and validate a cross-workflow lock-order or retry contract; they should provide an owned multi-CN regression environment and approve the global concurrency semantics.
Evidence
The stable failure spans CREATE, DIFF, PICK, MERGE, snapshots, database branches, and clones across independent databases. The reproducer depends on an external motr PR and demonstrates a systemic lock cycle rather than one bounded call path.
Please use this analysis to provide the missing decision, environment, evidence, or ownership
needed before the issue is returned to the AI candidate pool.
Activity
gouhongshen commentedon Aug 4, 2026
Automated AI triage
This issue requires human involvement and cannot currently be completed independently by the
automated fix loop.
Reason
Requires Data Branch/lock-service owners to define and validate a cross-workflow lock-order or retry contract; they should provide an owned multi-CN regression environment and approve the global concurrency semantics.
Evidence
The stable failure spans CREATE, DIFF, PICK, MERGE, snapshots, database branches, and clones across independent databases. The reproducer depends on an external motr PR and demonstrates a systemic lock cycle rather than one bounded call path.
Please use this analysis to provide the missing decision, environment, evidence, or ownership
needed before the issue is returned to the AI candidate pool.
gouhongshen commentedon Sep 7, 2026
调查完成,已提交 Draft PR #28325。
根因是两个独立的全局 catalog 生命周期门闩形成反向锁序:View metadata 锁
mo_tables/mo_view_refresh,Data Branch / clone / snapshot lineage 锁mo_feature_registry/SNAPSHOT。实测中 PICK 持有前者并等待目标行,独立数据库 DROP 持有后者并等待前者;目标行释放后 PICK 再请求后者,形成锁环。修复将两类悲观生命周期操作统一到 bootstrap 创建的
SNAPSHOTregistry 行;View catalog readiness 保留为共享门闩之后的无锁存在性检查,没有新增 retry 或 fallback。验证:
ERROR 20701,改后连续通过,race detector 通过,并校验 PICK 数据与 DROP 最终状态。exclusive_tests后以-j 9 --repeat 20运行:200/200cases、4840/4840statements,0 failed/0 skipped。pkg/catalog、pkg/frontend/databranchutils、pkg/frontend、pkg/sql/compile、pkg/cnservice、pkg/tests/upgrade测试通过;触达包go vet与make build通过。Issue 保持 open,等待人工验证后决定后续状态。
gouhongshen commentedon Sep 7, 2026
PR #28325 is trying to fix this issue.
fix(frontend): order composite lineage lifecycle locks (#28325)
gouhongshen commentedon Sep 7, 2026
PR #28325 has merged and is awaiting manual validation. The issue remains open.
Ariznawlll commentedon Sep 16, 2026
测试版本
main9572bd3311abb16d1df939956408a727bcf83eba原问题验证
使用原 issue 的 9 个 Data Branch/Clone/Snapshot 回归工作流,临时仅在测试副本中移除
exclusive_tests的串行保护后执行--parallel 9 --repeat 3。runner 明确显示parallel_cases=9, exclusive_cases=0;3 轮共 27 case、687 statement 全部成功,未出现ERROR 20701、等待超时或卡住。Happy Path 覆盖
Unhappy Path 覆盖
BETWEEN SNAPSHOT的拒绝原子性用例在并发批次中仍成功,确认异常路径没有破坏同批工作流。白盒验证
PR #28325 新增真实双 CN 的
TestIssue26404MixedDataBranchLifecycleDoesNotDeadlock,并覆盖 admission/retry 失败路径;本次并发 SQL 验收独立执行。回归测试
PR #28325 包含
pkg/tests/issues/issue_26404_test.go的双 CN 回归和锁序单测;motr 使用原 issue 的并发集合验证。测试副本的串行规则修改未提交到仓库。测试证据
PR #28325;本次 motr 汇总:
total=27 success=27 failed=0,stmts=687 ok=687 fail=0,cost=28.87s。测试结论
测试通过。
fix(frontend): order composite lineage lifecycle locks (matrixorigin#…
fix(frontend): order composite lineage lifecycle locks (matrixorigin#…
fix(frontend): order composite lineage lifecycle locks (matrixorigin#…