Skip to content

[Bug]: CN replacement leaves LockService bind unusable after Ready #28637

Closed

Description

@Ariznawlll

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

  1. Create a healthy 2-CN distributed cluster.
  2. Keep the normal service and LockService active.
  3. Delete one CN Pod and wait for CloneSet to create a replacement CN.
  4. After the replacement CN reports Ready, execute normal SQL and observe LockService/internal task logs.

Actual behavior

  • 17:39:43 CST: old CN mo-chaos-regression-dis-tp-cn-ghc9r was deleted.
  • 17:40:16: replacement CN mo-chaos-regression-dis-tp-cn-f9hvx started; 17:40:21 it became Kubernetes Ready and CN-store Ready.
  • 17:40:36: the surviving CN first logged lock 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

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

Activity

  1. added this to the MO-202609 milestone on Sep 10, 2026
  2. added
    kind/bug
    on Sep 10, 2026
  3. added
    severity/s0
    and removed on Sep 10, 2026
  4. assigned and unassigned on Sep 11, 2026
  5. Ariznawlll commented on Sep 11, 2026

    @Ariznawlll
    CollaboratorAuthor

    本轮 Chaos 验证

    TN→CN 响应丢失场景完成后删除一个 CN Pod 并等待 CloneSet 创建替换 CN。替换窗口内的 SQL probe 出现短暂连接中断;替换 CN 加入后,两个 CN 的建库、建表、写入和读取连续 3 次通过。整个场景未再观察到 20702 lock table bind changed,也没有持续不可用、panic、CrashLoopBackOff 或数据校验失败。

    对应收敛 gate 与回归编排已纳入 mo-nightly-regression#1661。

    测试通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions