-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
ddl: support concurrent ddl #32169
ddl: support concurrent ddl #32169
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
f064240
to
c8495c6
Compare
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
1 similar comment
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
c3c2de0
to
fc3f2f1
Compare
/hold |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/e542bccbcdb00c88a77b18ef4ee3225b3e50298f |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/2ff012c648b0118b6604516afd4f0f5ecd1c985f |
/unhold |
/run-build |
/run-mysql-test |
/run-unit-test |
1 similar comment
/run-unit-test |
/run-unit-test |
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/2e4b1d1df3498a4ffa1363d9aa6ae848fdd3c964 |
TiDB MergeCI notify🔴 Bad News! New failing [2] after this pr merged.
|
Signed-off-by: Weizhen Wang wangweizhen@pingcap.com
Signed-off-by: xiongjiwei xiongjiwei1996@outlook.com
Signed-off-by: wjhuang2016 huangwenjun1997@gmail.com
What problem does this PR solve?
Issue Number: ref #32031
this is a big PR and we split it into many commits, every commit almost has a single purpose. I will introduce them briefly, you may need to reference the doc #33629
init ddl tables
create
tidb_ddl_job
,tidb_ddl_reorg
,tidb_ddl_history
tables with raw meta write, these 3 tables is use to replace theddl job queue
andreorg
andhistory hash table
. you can see this part in docsetup concurrent ddl env and add ddl worker pool
this commit adds the
ddl worker pool
definition, theddl job manager
will find a job and ship it to a worker in the worker pool.Also, this commit provides a
sessionctx
wrapper, only use in ddl relate. it just wrapsbegin
,commit
andexecute
.add ddl manager to handle ddl job
this commit implements the ddl manager, which is used for
you can ref the doc. Also, it adds a function
HandleDDLJob
which will do the ddl job, and it is a replacer ofHandleDDLJobQueue
. The last thing of this commit is addingschemaVersionManager
to update the schema version in a new txn, it prevents the txn conflict with the schema version key.reorg handler for concurrent ddl
just implements the partner of the reorg information.
manage ddl jobs for concurrent ddl
same as above, the partner of
add job
,delete job
and many other related to history jobchange ddl interface caller
because many of the functions need a session now, we just change the caller
add metrics for concurrent ddl
add metrics
migrate ddl between table and queue
support switch between the old and new ddl framework, migrate the existing ddl job between queue and table
What is changed and how it works?
Check List
Tests
Release note