Commit Graph

262 Commits

Author SHA1 Message Date
d0f8487dea *: support specifying range bits for auto_random (#36860)
close pingcap/tidb#32508
2022-08-16 20:54:50 +08:00
62acece63c ddl: refine param for backfillWorker (#37070) 2022-08-15 10:12:50 +08:00
93a31f0f1c ddl: fix inaccurate row_count for admin show ddl jobs (#36716)
close pingcap/tidb#25968
2022-08-01 16:40:05 +08:00
96d2c25c92 ddl: implement intra-table DDL for SchemaTracker (#36176)
close pingcap/tidb#35933
2022-07-29 19:33:13 +08:00
624171abcc *: decouple planner/core from ddl package (#36608) 2022-07-27 21:15:12 +08:00
c79a332e74 ddl: fix update panic in the middle of multi-schema change (#36421)
ref pingcap/tidb#14766
2022-07-21 22:33:10 +08:00
ab513bf0ca ddl: support concurrent ddl (#32169)
* 1. 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 the ddl job queue and reorg and history hash table

* 2. setup concurrent ddl env and add ddl worker pool

adds the ddl worker pool definition, the ddl 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 wraps begin, commit and execute

* 3. add ddl manager to handle ddl job

* 4. reorg handler for concurrent ddl

just implements the partner of the reorg information.

* 5. manage ddl jobs for concurrent ddl

add the partner of add job, delete job and many others related to history job
because many of the functions need a session now, we just change the caller

* 6. add metrics for concurrent ddl

add metrics

* 7. support multiple tables

* 8. fix test

* 9. migrate ddl between table and queue

support switch between the old and new ddl framework, migrate the existing ddl job between queue and table

* 10. check tikv version and set reorg worker count according cpu count

* *: add featuretag on tests

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* use a determined table id for 3 tables

* remove ctx value

* add GetSchemaVersionWithNonEmptyDiff function

* address tangenta and zimulala comment

* use only one etcd path

* make ActionRenameTable support multi-schema

* reset sql digest to make top sql work correct

* add comment

* fix test

* remove 0 for schema version lock

Co-authored-by: xiongjiwei <xiongjiwei1996@outlook.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: wjHuang <huangwenjun1997@gmail.com>
2022-07-20 21:20:07 +08:00
c8e27fe0b9 ddl: handle rolling back modify columns correctly (#36282)
ref pingcap/tidb#14766
2022-07-18 23:55:07 +08:00
8b30e52bcf ddl: only use one schema version for the non-revertible step (#36262)
ref pingcap/tidb#14766
2022-07-18 21:49:07 +08:00
2193bfe3b7 *: remove system var tidb_enable_change_multi_schema (#36167)
ref pingcap/tidb#14766
2022-07-14 10:37:05 +08:00
12c172163b ddl: support rename index and columns for multi-schema change (#36148)
ref pingcap/tidb#14766
2022-07-13 17:39:05 +08:00
9c3cf3f2e5 ddl: support modify column for multi-schema change (#36040)
ref pingcap/tidb#14766
2022-07-12 14:47:05 +08:00
1a9a7a614c statistics,planner: let index support sync stats (#35879)
ref pingcap/tidb#35764
2022-07-11 17:23:05 +08:00
d5898d03a9 ddl: remove onDropIndexes (#35960)
ref pingcap/tidb#14766
2022-07-06 12:17:02 +08:00
65e0b8e541 client: KV requests with source label (#34833)
close pingcap/tidb#33963
2022-07-01 19:46:39 +08:00
bc00ddb3ca ddl: remove onDropColumns and onAddColumns (#35862)
ref pingcap/tidb#14766
2022-06-30 22:58:39 +08:00
1c259da69d ddl: fix potential wrong column definition when setting default value (#35845)
close pingcap/tidb#35846
2022-06-30 18:34:39 +08:00
17e2731c5f ddl: support drop columns for multi-schema change (#35737)
ref pingcap/tidb#14766
2022-06-30 16:28:39 +08:00
2c4d1dfd36 ddl: implement the core for multi-schema change (#35429)
ref pingcap/tidb#14766
2022-06-24 19:34:38 +08:00
27a1b944b8 error: split an error type from ErrKeyColumnDoesNotExists (#35394)
close pingcap/tidb#35102
2022-06-17 15:46:35 +08:00
15711231be ddl: use reorg handler to manage the reorganization information of DDL job (#35030)
ref pingcap/tidb#32031
2022-06-01 13:42:27 +08:00
a607e7df6b ddl: make jobCtx maintained by ddlCtx (#34979)
close pingcap/tidb#34980
2022-05-28 13:22:48 +08:00
dba4dab5d5 ddl: make reorgCtx maintained by ddlCtx (#33878)
close pingcap/tidb#34121
2022-05-26 13:40:47 +08:00
fc1065032b ddl: use tidb_allow_remove_auto_inc to control drop column with auto_inc (#34908)
close pingcap/tidb#34891
2022-05-26 13:20:47 +08:00
93859ddff0 ddl: correct the job.SchemaState in DROP cases (#34235)
ref pingcap/tidb#32939
2022-04-28 12:14:51 +08:00
1bf64c60f4 *: Refactor FieldType structure (#33569)
close pingcap/tidb#32116
2022-04-26 19:28:51 +08:00
161e835df9 ddl: add ddlCtx for ddl interface (#34153)
ref pingcap/tidb#33635
2022-04-24 13:32:48 +08:00
e9b7f77726 topsql: add more test to check resource tag for each RPC request (#33623)
close pingcap/tidb#33208
2022-04-07 11:58:32 +08:00
11ca0d4af2 ddl: extract data reorg code to separate functions (#33679)
ref pingcap/tidb#14766
2022-04-02 17:54:29 +08:00
a9ef87bd88 ddl: refactor modify column for multi-schema change (#33631)
ref pingcap/tidb#14766
2022-04-01 17:34:30 +08:00
191a2dcda1 topsql: fix the issue of TopSQL doesn't catch the scan_rows of DDL executions (#33370)
close pingcap/tidb#33202
2022-03-30 21:06:30 +08:00
c6b47c918f ddl: refactor adjustColumnInfoInAddColumn for multi-schema change (#32820)
ref pingcap/tidb#14766
2022-03-29 17:34:29 +08:00
43c0622d42 ddl: rewrites some DDL tests (#33277)
ref pingcap/tidb#33008
2022-03-23 13:30:32 +08:00
e8ee6c1939 topsql: fix the issue of TiDB doesn't set the request tag for DDL before send RPC request to TiKV (#33133)
close pingcap/tidb#33132
2022-03-17 16:18:30 +08:00
a1d8f2f3ac *: remove ddl dependency (#32910)
ref pingcap/tidb#31716
2022-03-09 08:15:48 +08:00
f5a52909b6 ddl: fix the error using default timestamp (#32384)
close pingcap/tidb#31968
2022-03-03 13:01:46 +08:00
1624123b84 *: fix time zone problems encountered when changing the other type columns to timestamp type columns (#31843)
close pingcap/tidb#29585
2022-02-21 23:11:42 +08:00
a97fe372ae ddl: fix a bug when drop a column with single index (#32211)
close pingcap/tidb#32079
2022-02-16 13:37:39 +08:00
e7da7d4f95 *: change fsp from int8 to int (#28347) 2022-01-27 13:59:12 +08:00
2e1cff73f3 *: add ExecRestrictedSQL() func for RestrictedSQLExecutor interface (#31618)
ref pingcap/tidb#30918
2022-01-24 21:30:11 +08:00
b9956f6fef *: fix add index metrics (#30915)
close pingcap/tidb#31115
2022-01-17 21:29:44 +08:00
4763a702c7 ddl: reorganize in conversion between double and float (#31431)
close pingcap/tidb#31372
2022-01-07 22:14:37 +08:00
5cd37f0008 session: fix data race in ParseWithParamsInternal (#31058)
close pingcap/tidb#30918
2022-01-06 21:02:37 +08:00
#7
d2c352980a ddl: fix the error message when drop the index column (#29526)
close pingcap/tidb#29344
2021-12-31 00:27:51 +08:00
4ca3b02c90 ddl: fix concurrent column type changes(with changing data) that cause schema and data inconsistencies (#31051)
close pingcap/tidb#31048
2021-12-28 12:43:49 +08:00
23c71f1a3b execute: don't transform charset in internal sql (#30843)
close pingcap/tidb#30789
2021-12-20 17:15:46 +08:00
a6fc5c6ed4 ddl: revert "ddl: remove unnecessary locking when adding an index" (#30667) 2021-12-16 22:36:36 +08:00
8e525d8d88 ddl: remove unnecessary locking when adding an index (#29772) 2021-12-11 14:45:57 +08:00
28446605c2 expression: fix tidb can't alter table from other-type with null value to timestamp with NOT NULL attribute (#29664) 2021-12-03 15:57:54 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00