-
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 batch create table #28763
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. |
/cc @wjhuang2016 |
/run-check_dev_2 |
1 similar comment
/run-check_dev_2 |
It is a problem of the unit test code, should be fixed now. |
A integration test show the number of tables > 10000, the function call CreateTablesWithInfo got stuck. as private communication with xhebox, it looks CreateTablesWithInfo hit the raft entry max size limitation ( the sum of batch tables shall less than 500 if raft-entry-max-size = 8M (by default))
|
BR batch size set to 500, restore successful. I think we are good to merge this PR to master. |
/run-unit-test |
This pull request has been accepted and is ready to merge. Commit hash: 319fbda
|
/hold |
/unhold |
/cherry-pick release-5.4 |
cherry pick to release-5.4 in PR #31234 |
Signed-off-by: ti-srebot <[email protected]>
* topsql: make topsql enable only be controlled by pub/sub sink (pingcap#31209) * ddl: support batch create table (pingcap#28763) * executor: fix data race in IndexMergeReaderExec (pingcap#31230) close pingcap#31229 * server: filter the EOF error for normal closed at handshake (pingcap#31081) close pingcap#31063 * expression: change date add function return type (pingcap#28133) close pingcap#27573 * support create interval partition Signed-off-by: crazycs520 <[email protected]> * support create interval partition (support int/timestamp partition key) Signed-off-by: crazycs520 <[email protected]> * parser: support alter table partitions move engine statement Signed-off-by: crazycs520 <[email protected]> * support ddl operation Signed-off-by: crazycs520 <[email protected]> * support interval partition manager Signed-off-by: crazycs520 <[email protected]> * support interval partition manager handle job framwork Signed-off-by: crazycs520 <[email protected]> * support auto create interval partition when insert meet no partition suitable error Signed-off-by: crazycs520 <[email protected]> * fix bug Signed-off-by: crazycs520 <[email protected]> * fix cancel job and load old job then continue to do Signed-off-by: crazycs520 <[email protected]> * make partition readonly work(not allow to insert/update/delete) Signed-off-by: crazycs520 <[email protected]> * add begin,end time in tables Signed-off-by: crazycs520 <[email protected]> * tiny fix for auto create interval partition in concurrent case Signed-off-by: crazycs520 <[email protected]> * init Signed-off-by: crazycs520 <[email protected]> * init Signed-off-by: crazycs520 <[email protected]> * todo: remove flag Signed-off-by: crazycs520 <[email protected]> * fix dumpling Signed-off-by: crazycs520 <[email protected]> * remove data in aws s3 when drop/truncate table/partition Signed-off-by: crazycs520 <[email protected]> * make hello world work Signed-off-by: crazycs520 <[email protected]> * remove debug info Signed-off-by: crazycs520 <[email protected]> Co-authored-by: xhe <[email protected]> Co-authored-by: guo-shaoge <[email protected]> Co-authored-by: knull-cn <[email protected]> Co-authored-by: Meng Xin <[email protected]>
What problem does this PR solve?
Issue Number: refer #30272
Problem Summary: add an internal batch create table api for br, all happens in one schema version.
Some notes on the behavior:
query
since it is not from parser. One must setctx.Value(sessionctx.QueryString)
manually for displayingadmin show ddl queries
.admin show ddl jobs
can not show multiple ids intableID
column, but will show comma separated list of table names intableName
column.What is changed and how it works?
What's Changed:
CreateTablesWithInfo
, the new batch api.CreateTableWithInfo
andCreateTablesWithInfo
are extracted.onCreateTable
andonCreateTables
are extracted.db_test.go
andtable_test.go
.Affected []HistoryInfoAffected
inbinlog.HistoryInfo
for display multiple table names.Check List
Tests
Side effects
Documentation
Release note