## 问题描述 2026-07-14 main TKE nightly regression 发现 TPCH_10 和 TPCH_100 的 `sum(cost)` 出现严重性能回归。通过二分定位,确认 first bad commit 为 PR #25651 引入的 `67898b60fef9936f63119080c0206ea1492883ce`。 ## 回归数据 | 指标 | Good (`3728f3872`, 07-13) | Bad (`67898b60f`, 07-14) | 变化 | |---|---|---|---| | TPCH_10 sum(cost) | 13,492 | 63,855 | **+373%** | | TPCH_100 sum(cost) | 88,949 | 144,964 | **+63%** | | TPCH_1000 sum(cost) | 1,008,496 | 1,043,552 | +3.5%(正常波动) | ## 二分结果 二分 workflow: [mo-auto-test#29387213506](https://github.com/matrixorigin/mo-auto-test/actions/runs/29387213506) | 轮次 | Commit | TPCH_10 sum(cost) | Delta vs baseline | Verdict | |---|---|---|---|---| | Baseline | `3728f3872` | 13,882 | — | good | | Suspect bad | `6b2f87c7f` | 59,328 | +327% | bad | | Iter 1 | `6fdcdfc31` | 59,318 | +327% | bad | | Iter 2 | `cb94d9495` | 61,295 | +342% | bad | | Iter 3 | `0f4e2b9ec` | 13,197 | -4.93% | **good** | | Iter 4 | `67898b60f` | 58,307 | +320% | bad | | Iter 5 | `67898b60f` | 61,901 | +346% | **found** | - **First bad commit**: `67898b60f` — `fix(lockservice): recover active txn checks after CN recreation (#25651)` - **Last good commit**: `0f4e2b9ec` — `fix: isolate account FK cleanup and UDF database checks (#25681)` ## 可疑改动分析 PR #25651 修改了 MORPC 通信层和 lockservice 恢复路径,主要改动: 1. **MORPC targeted backend detachment with per-remote epochs** — 可能影响正常查询路径上的 RPC 调用开销 2. **Bounded pure-Go DNS lookup on GetActiveTxn recovery path** — 虽然声明仅在 recovery path 使用,但需要确认是否有热路径被影响 3. **Linearizes Valid commit admission with invalid-CN fencing** — 可能增加 lock/transaction 热路径上的锁竞争 4. **Bounds recovery endpoint cache** — 缓存限制可能导致频繁重建连接 TPCH_10/TPCH_100 是分布式多表 JOIN 查询,对 CN 间 RPC 通信开销非常敏感。上述改动中任何增加正常 RPC 路径开销的变更都可能导致这种幅度的回归。 ## 环境信息 - **Cluster**: TKE, 3 CN + 1 DN - **CN memory limit**: 55Gi, gomemlimit 25000MiB - **CN memory cache size**: 12Gi - **Runner**: `amd64-mo-guangzhou-2xlarge16` ## Nightly Run 链接 - 回归 run: [mo-nightly-regression#29343799825](https://github.com/matrixorigin/mo-nightly-regression/actions/runs/29343799825) - Namespace: `mo-main-commit-6b2f87c7f-20260714` ## 建议 1. 检查 PR #25651 中 MORPC backend/epoch 相关改动是否影响了非 recovery 的热路径 2. 用 Pyroscope 对比 `0f4e2b9ec` (good) 和 `67898b60f` (bad) 的 CPU profile,定位 morpc/lockservice 热点 3. 如确认是热路径开销增加,建议优化或 revert cc @XuPeng-SH @aptend @gouhongshen
Activity
fix(morpc): wake waiters when backend creation completes (#25771)
XuPeng-SH commentedon Jul 16, 2026
fixed
Ariznawlll commentedon Jul 16, 2026
最新main:0d8111aef18ed25aa4eb35113f8bea9e6ab66587
tpch性能已恢复
fix(morpc): wake waiters when backend creation completes (matrixorigi…
fix(morpc): wake waiters when backend creation completes (matrixorigi…
fix(morpc): wake waiters when backend creation completes (matrixorigi…