pingcap / pingcap/ticdc

Changefeed got stuck due to can not finish incremental scan when many tables share one region.

Open
#1,181 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

After creating 10 million empty tables, PD will merge them into only more than 1,000 regions, so that many tables share one region.
Moreover, these regions are located on a small number of TiKV nodes, which will cause the cdc incremental scan to fully utilize the CPU of the TiKV endpoint, and the incremental scan cannot be completed. Which lead to changefeed got stuck.

Image

Image

CDC Version

Release Version: v9.0.0-alpha-185-gb3c5be2a
Git Commit Hash: b3c5be2a5565c111a4babfe10b5b7f3bfb87da74
Git Branch: master
UTC Build Time: 2025-03-27 03:10:59
Go Version: go version go1.23.4 darwin/arm64
Failpoint Build: false

TiKV Version

v8.5.1

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

Begin by reproducing the issue with 10 million empty tables distributed across more than 1,000 regions, using the reported CDC and TiKV versions. Trace the cdc incremental scan when many tables share regions and confirm that the changefeed completes without exhausting a TiKV endpoint's CPU.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
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.