pingcap / pingcap/tiflow

Changefeeds are not distributed evenly over TiCDC nodes

Open
#11,331 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects-8.5 area/ticdc may-affects-5.4 may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 severity/major type/bug
Dominant language
Go
Stars
464
Forks
313
Avg merge
4d 7h
Merged PRs (30d)
14

Description

What did you do?

Creating multiple changefeeds where each one contains only one table results in all table tasks being sent to a single capture. This is unreasonable. I think before we bind a table to a capture, we should add more judgment conditions, such as considering the current tasks already bound to it. Then, we can choose the best capture to bind the table to, which will be better for this scenario.
https://github.com/pingcap/tiflow/blob/master/cdc/scheduler/internal/v3/scheduler/scheduler_basic.go#L81-L82

What did you expect to see?

The tasks evenly distirbuted on different ticdc nodes.

What did you see instead?

All of them are bound on specific node.

Versions of the cluster

TiCDC version (execute cdc version):

v7.1.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

Start with cdc/scheduler/internal/v3/scheduler/scheduler_basic.go at lines 81-82 and trace how table tasks are selected and bound to captures. Compare the current task assignments across multiple single-table changefeeds; done means tasks are distributed more evenly across available TiCDC nodes without losing correct binding behavior.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.