pingcap / pingcap/ticdc

Large amount of initial scan tasks affects the lags of normal running changefeeds

Open
#1,400 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

For example, when a changefeed related to lots of regions start, there are lots of initial(incremental) scan tasks are sent to TiKV. TiKV has got only one task list for the scan tasks. So the task list are full of scan tasks, which needs a long time to consume them all. During the processing, some normal scan tasks from the running changefeeds could be generated caused by Region split/merge/migration. And those normal scan tasks have to wait for a long time, which introduce long lags.

We already done some optimizations, including

  1. https://github.com/pingcap/ticdc/pull/1219 During the starting of a changefeed, split the tasks into small batches, and only send one batch to TiKV at a time.

TODO:

  1. Run more tests to learn the current situation.
  2. More optimizations to mitigate the issue if required.

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

Start by reviewing PR #1219 and the described changefeed startup batching behavior. Run tests or experiments that measure normal scan-task lag while a large initial scan is active, then determine whether further mitigation is required. The issue names no files or tests, so the relevant implementation and validation locations will need to be identified first.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.