TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
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.
Enhancement
ALTER DATABASE SET TIFLASH REPLICA
will create a separate DDL job for each table inside, and they all share the samequery
, 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.