pingcap / pingcap/ticdc

CDC register request may hang on follower for newly split regions before leader election completes

Open
#4,535 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Go
Stars
56
Forks
63
Avg merge
2d 20h
Merged PRs (30d)
34

Description

What did you do?

For a newly created region, for example after a split, if leader election has not completed yet, TiCDC's region register request may be sent to a follower first.

In that case, the request may remain pending on the follower:

  • it does not start initialization
  • it does not replicate any data
  • it does not return an error

As a result, TiCDC keeps the region in Initialized=false state and reports it as a slow initialized region. This can leave the region stuck for a long time.

What did you expect to see?

No response

What did you see instead?

None

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):

(paste TiKV version here)

TiCDC version (execute cdc version):

(paste TiCDC version here)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reproducing the register request against a newly split region before leader election completes, then trace TiCDC's region registration and follower handling. Done means the request does not remain pending and the region can leave Initialized=false without becoming stuck.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.