table scheduler is changefeed level, which could lead to imbalance in some scenarios #3654
Labels
area/ticdc
Issues or PRs related to TiCDC.
component/scheduler
TiCDC inner scheduler component.
subject/new-feature
Denotes an issue or pull request adding a new feature.
Is your feature request related to a problem?
test with cdc master@pingcap/ticdc@39cfb3e
Describe the feature you'd like
The tables replication stream can be dispatched to 3 TiCDC nodes evenly.
But we will observe the tables are not even among 3 TiCDC nodes. This is caused by the table scheduler is in changefeed level, ref: https://github.com/pingcap/ticdc/blob/39cfb3eda4fee3a340a8b8dfd618195967455359/cdc/owner/changefeed.go#L76-L79
and the scheduler algorithm is based on min workload with a random map accessing. https://github.com/pingcap/ticdc/blob/39cfb3eda4fee3a340a8b8dfd618195967455359/cdc/owner/scheduler.go#L206
workloads
is a map with some undeterminable accessing, but not enough.workload ratio is
7:2:1
among three TiCDC nodes.Describe alternatives you've considered
In the short term, we can add more random factors to changefeed scheduler, such as
In the long term, we can add better scheduler algorithm.
Teachability, Documentation, Adoption, Migration Strategy
No response
The text was updated successfully, but these errors were encountered: