tiflow icon indicating copy to clipboard operation
tiflow copied to clipboard

TiCDC support create table accelerate in TiDB

Open hongyunyan opened this issue 10 months ago • 0 comments

In https://github.com/pingcap/tidb/issues/50052, TiDB do the optimization for creating tables. In new implementations, create table ddls will not be inserted into table tidb_ddl_job, but only be inserted into table tidb_ddl_history when create table is finished.

Currently TiCDC only listen to tidb_ddl_job table to fetch the ddl changes. So in order to adapt to the new implementations in ddl, we need to also listen to tidb_ddl_history table to fetch the create table ddl.

Fortunately, create table ddl still has a eariler CommitTS and StartTs than other ddls in the same table. So we can still use CommitTS and StartTs to sort all ddls in tidb_ddl_job and tidb_ddl_history.

hongyunyan avatar Apr 16 '24 02:04 hongyunyan