Skip to content

TiCDC support create table accelerate in TiDB #10908

@hongyunyan

Description

@hongyunyan

In pingcap/tidb#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ticdcIssues or PRs related to TiCDC.type/enhancementThe issue or PR belongs to an enhancement.type/featureIssues about a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions