ALTER DATABASE SET TIFLASH REPLICA will create a separate DDL job for each table inside
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
`ALTER DATABASE SET TIFLASH REPLICA` will create a separate DDL job for each table inside, and they all share the same `query`, if we replicate from TiDB -> TiDB using binlog, from the view of it, they are different DDL and executed all of them in downstream, it causes N^2 such DDL jobs at downstream, suppose there are N tables for the database.
TiCDC should have same issue in theory.
we should create 1 job for a single DDL.
Contributor guide
Research direction
Start by tracing creation of DDL jobs for ALTER DATABASE SET TIFLASH REPLICA, then inspect how binlog and TiCDC replication handle the shared query. The issue names no files or tests; done means one job is created for the single database-level DDL instead of one per table, including downstream replication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100