Repository navigation
Description
Description
在 2-CN 分布式集群中,删除一个 CN 并由 CloneSet 创建替换 CN 后,替换 CN 已达到 Kubernetes Ready 与 matrixorigin.io/cn-store=True,但集群持续返回 ERROR 20702 (HY000): lock table bind changed。普通 SQL、内部日志/指标写入及 upgrade-framework 任务均受影响,至少 40 分钟未收敛。
该问题与 #27707 同属 CN 成员替换后的 LockService 恢复场景,但不是已确认的同一路径:本次未观察到 lockservice service ... is absent from cluster inventory、replacement CN panic 或 CrashLoop。
Environment
- Branch:
main - Commit:
9a07655c54efdd1b5d24f801f701602b7231d013 - Deployment: distributed cluster with 3 LogService, 2 CN, 1 DN and 1 Proxy
- Namespace:
mo-chaos-main-9a07655-202609101734 - Date: 2026-09-10
Steps to reproduce
- Create a healthy 2-CN distributed cluster.
- Keep the normal service and LockService active.
- Delete one CN Pod and wait for CloneSet to create a replacement CN.
- After the replacement CN reports Ready, execute normal SQL and observe LockService/internal task logs.
Actual behavior
17:39:43 CST: old CNmo-chaos-regression-dis-tp-cn-ghc9rwas deleted.17:40:16: replacement CNmo-chaos-regression-dis-tp-cn-f9hvxstarted;17:40:21it became Kubernetes Ready and CN-store Ready.17:40:36: the surviving CN first loggedlock table bind changed, 15 seconds after the replacement CN was Ready.- The subsequent SQL setup for the LogService recreation lane failed with
ERROR 20702 (HY000): lock table bind changed; the LogService deletion injection was therefore never reached. 18:20:47: the replacement CN was still retrying upgrade-framework work with the same error, about 40 minutes after Ready.
Expected behavior
After a CN replacement, LockService bindings should converge within a bounded recovery window. Normal SQL and internal tasks should recover without persistent 20702; the replacement CN being Ready must not leave the cluster database-unavailable.
Stability and controls
- Reproducer: 1/1 targeted Chaos run so far.
- Control: the checkpoint I/O recovery lane and the TN-to-CN ambiguous-commit data check completed before the post-replacement failure.
- No replacement CN panic, CrashLoopBackOff, OOM, or data inconsistency was observed in this run.
- The failure persisted after the CN replacement rather than being a single startup error.
Evidence
- Chaos job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/34461273874/job/102820587019
- K8s event and pod timeline recorded in namespace
mo-chaos-main-9a07655-202609101734. - The error remained visible in the replacement CN at
18:20:47 CST.
Code analysis
No source-level root cause is confirmed. The observed behavior is consistent with a stale or invalid LockService bind not being revalidated/rebound after CN membership changes, but the evidence does not establish the missing-owner startup path tracked by #27707.
Regression coverage
Add a distributed Chaos case that deletes one CN, waits for a replacement CN, then requires repeated cross-CN SQL and LockService health probes to succeed within a bounded window. The test must fail if 20702 lock table bind changed continues after the replacement CN is Ready.
Related
- [Bug]: CN repeatedly panics during rolling update when LockService owner is absent from cluster inventory #27707: related CN replacement / LockService recovery issue, but not confirmed as the same root cause.
- fix(lockservice): recover rejected routes and quiesce departed owners #28474: open LockService recovery PR; this incident image does not include it.
Activity
Ariznawlll commentedon Sep 11, 2026
本轮 Chaos 验证
mainb349fea56f1c16e3c947ac730cc114fca3c3f241TN→CN 响应丢失场景完成后删除一个 CN Pod 并等待 CloneSet 创建替换 CN。替换窗口内的 SQL probe 出现短暂连接中断;替换 CN 加入后,两个 CN 的建库、建表、写入和读取连续 3 次通过。整个场景未再观察到
20702 lock table bind changed,也没有持续不可用、panic、CrashLoopBackOff 或数据校验失败。对应收敛 gate 与回归编排已纳入 mo-nightly-regression#1661。
测试通过。