Closed hawkingrei closed 1 year ago
[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 /cc @reviewer
in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer
in the comment to help you merge this pull request.
The full list of commands accepted by this bot can be found here.
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
*: what is changed
After you have format title, you can leave a comment /run-check_title
to recheck it
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
*: what is changed
After you have format title, you can leave a comment /run-check_title
to recheck it
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
*: what is changed
After you have format title, you can leave a comment /run-check_title
to recheck it
just fix the mutex conflict. Now mutex design is too difficult to develop in the DDL. it needs to be improved.
/run-mysql-test
/run-all-tests
/run-mysql-test
Found a bug about blocking when to create an index.
/run-mysql-test
/run-mysql-test
/run-mysql-test
/run-unit-test
/run-mysql-test
/run-mysql-test
/run-mysql-test
/run-mysql-test
/run-all-tests
/run-unit-test
/run-check_dev_2
/run-check_dev_2
/run-check_dev_2
/run-check_dev_2
/run-all-tests
/run-check_dev
/run-check_dev
/run-mysql-test
/run-check_dev_2
/run-check-dev
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
*: what is changed
After you have format title, you can leave a comment /run-check_title
to recheck it
/run-mysql-test
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
*: what is changed
After you have format title, you can leave a comment /run-check_title
to recheck it
/run-mysql-test
/run-unit-test
/run-unit-test
/run-mysql-test
/run-unit-test
/run-unit-test
/run-unit-test
/run-unit-test
/run-unit-test
/run-check_dev_2
/run-unit-test
/run-unit-test
/run-unit-test
/run-check_dev_2
/run-unit-test
/run-all-tests
/run-all-tests
/run-unit-test
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 https://github.com/pingcap/tidb/issues/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 https://github.com/pingcap/tidb/pull/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 asessionctx
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