Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass the DDL layer for creating tables faster #1381

Open
YuJuncen opened this issue Jul 26, 2021 · 1 comment
Open

Bypass the DDL layer for creating tables faster #1381

YuJuncen opened this issue Jul 26, 2021 · 1 comment
Labels

Comments

@YuJuncen
Copy link
Collaborator

YuJuncen commented Jul 26, 2021

Feature Request

Describe your feature request related problem:

When restoring many tables, it cost too many time for creating table, rebase auto ID or things likewise.

Describe the feature you'd like:

Use the meta.Meta API from TiDB directly to create tables.

Describe alternatives you've considered:

The current version -- using DDL to create tables, or execute the DDLs over the owner node.

Teachability, Documentation, Adoption, Migration Strategy:

There are about three steps when we want to creating a table from a model.TableInfo:

  1. alloc a new table ID for new table.
  2. create the table via Meta.CreateTableOrView.
  3. update the diff to the information schema, and waiting for other TiDB instance update this too.

(TODO: consistency, performance testing, etc..)

@lance6716
Copy link
Contributor

seems very helpful for DM's schema tracker 👍 will port it after your PR merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants