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. DetailsReviewer 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
|
/run-tics-test |
|
/run-integration-cdc-test |
|
/run-integration-ddl-test |
|
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/d8bfb403d6eeffbd1c50392b3ecc4957062db1e5 |
|
/run-integration-cdc-test |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: d8bfb40 |
|
/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_historytables with raw meta write, these 3 tables is use to replace theddl job queueandreorgandhistory hash table. you can see this part in docsetup concurrent ddl env and add ddl worker pool
this commit adds the
ddl worker pooldefinition, theddl job managerwill find a job and ship it to a worker in the worker pool.Also, this commit provides a
sessionctxwrapper, only use in ddl relate. it just wrapsbegin,commitandexecute.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
HandleDDLJobwhich will do the ddl job, and it is a replacer ofHandleDDLJobQueue. The last thing of this commit is addingschemaVersionManagerto 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 joband 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