Commit Graph

518 Commits

Author SHA1 Message Date
48e496afc2 executor: correct the column name shown in show next_row_id (#36471)
close pingcap/tidb#36470
2022-07-25 09:41:09 +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
2f934d67a2 *: support show ddl jobs for sub-jobs (#36168)
ref pingcap/tidb#14766
2022-07-13 20:57:05 +08:00
637d00c05a ddl: refine history job code (#35967) 2022-07-06 11:43:02 +08:00
157c178f27 *: seperate TxnScope and ReplicaReadScope (#35877)
close pingcap/tidb#31772
2022-07-05 11:33:02 +08:00
65e0b8e541 client: KV requests with source label (#34833)
close pingcap/tidb#33963
2022-07-01 19:46:39 +08:00
5b305c34f8 txn: manage the initialization of RCCheckTS by transaction context provider (#35554)
close pingcap/tidb#35497
2022-06-29 16:14:39 +08:00
82f0faf78a executor: fix left join on partition table generate invalid lock key (#35732)
close pingcap/tidb#28073
2022-06-28 13:08:39 +08:00
31c92c67bc sessionctx: support encoding and decoding statement context (#35688)
close pingcap/tidb#35664
2022-06-27 12:20:39 +08:00
0998cba23d txn: refactor ts acquisition within build and execute phases (#35376)
close pingcap/tidb#35377
2022-06-27 11:58:38 +08:00
26df62fef2 test: improve some tests (#35092)
ref pingcap/tidb#32031
2022-06-01 18:50:28 +08:00
eb46685055 *: add methods to session.Context and refactor some code about ddl (#34699)
close pingcap/tidb#32031
2022-05-30 12:46:26 +08:00
7f023bd61b ddl: wrap some functions for ddl job (#34920)
close pingcap/tidb#34919
2022-05-29 15:38:26 +08:00
d45a9c8af8 executor, parser, sessionctx: push down InRestrictedSQL flag to proto buffer (#34861)
close pingcap/tidb#34860
2022-05-26 14:06:47 +08:00
a9614850f9 *: move config file option oom-action to sysvar (#34644)
ref pingcap/tidb#33769
2022-05-19 05:16:38 +08:00
218247e80e *: improve stack message in the panic log (#34564)
close pingcap/tidb#34356
2022-05-11 16:34:34 +08:00
33236ba8d7 *: track analyze memory usage separately with quota (#33054)
ref pingcap/tidb#29938, close pingcap/tidb#33065
2022-05-10 20:32:35 +08:00
73f3435346 ddl: move some admin function to ddl (#34527)
close pingcap/tidb#34526
2022-05-10 18:14:34 +08:00
f88dab92f9 util: use generics to implement max/min (#34197)
close pingcap/tidb#34247
2022-05-06 10:08:57 +08:00
0d5ac6f3cb sysvar, config: mapping config settings to system variables. (#33279)
ref pingcap/tidb#32887
2022-04-29 13:20:52 +08:00
1bf64c60f4 *: Refactor FieldType structure (#33569)
close pingcap/tidb#32116
2022-04-26 19:28:51 +08:00
fb342ff861 topsql: fix issue of topsql failed catch the running SQL when topsql is enabled in execution (#33861)
close pingcap/tidb#33859
2022-04-26 13:16:51 +08:00
d23a81488a *: Move stale read context to TxnManager (#33812)
close pingcap/tidb#31954, close pingcap/tidb#33014, close pingcap/tidb#33832
2022-04-25 16:52:51 +08:00
1d485d11ed topsql: fix admin check/cleanup/recover statement doesn't set tag for RPC request (#33869)
close pingcap/tidb#33716
2022-04-13 18:00:36 +08:00
d4d43ba0b4 txn: support read consistency read with ts checking (#32922)
close pingcap/tidb#33159
2022-03-16 20:49:52 +08:00
4ab66b8ac2 executor: refine execution of cancelDDL (#32914)
close pingcap/tidb#32913
2022-03-09 14:51:49 +08:00
493eb45c75 *: table partition dynamic prune mode with Physical Table ID from unistore (#31634)
close pingcap/tidb#29851
2022-03-04 01:21:46 +08:00
7e627e8222 executor: make the create/start/end time in admin show ddl jobs TZ aware (#32450)
ref pingcap/tidb#26642
2022-02-23 17:25:43 +08:00
f60a589147 executor: tiny refactor code to improve CheckTableExec (#32295)
close pingcap/tidb#32294
2022-02-22 16:27:43 +08:00
e592cef7e0 *: add create time to admin show ddl jobs (#32435)
ref pingcap/tidb#23494
2022-02-17 21:17:40 +08:00
a31ca21830 planner: support sysdate behavior according to sysdate_is_now (#31881)
close pingcap/tidb#31872
2022-02-16 18:53:39 +08:00
1cf4fcfa73 *: support prepared plan cache for cached table (#32139)
close pingcap/tidb#32003
2022-02-14 12:29:37 +08:00
9c64224c49 *: Reduce data inconsistencies (#31547)
ref pingcap/tidb#26833
2022-02-11 13:51:36 +08:00
e7da7d4f95 *: change fsp from int8 to int (#28347) 2022-01-27 13:59:12 +08:00
2d62d23b20 planner: support trace candidates for Datasource (#31810)
ref pingcap/tidb#29661
2022-01-21 11:11:45 +08:00
a0e31aa987 *: fix data race in the CheckMb4ValueInUTF8 (#31781)
close pingcap/tidb#31780
2022-01-19 17:33:45 +08:00
465f655889 * : replace fmt.Sprint with strconv (#31718)
ref pingcap/tidb#31716
2022-01-17 15:11:44 +08:00
xhe
4f30a14256 ddl: support batch create table (#28763) 2021-12-31 17:13:50 +08:00
9ffeff2857 types: convert to new charset before inserting to blob or json column (#31031)
close pingcap/tidb#30690
2021-12-30 21:35:50 +08:00
0ab0dad9da *: allow TiDB to use TiKV's RC for high performance read (#30943)
close pingcap/tidb#30942
2021-12-30 16:57:50 +08:00
e9ab05f90f topsql: move topsql variable to topsql/state for avoid import cycle (#31134)
close pingcap/tidb#31136
2021-12-29 19:51:50 +08:00
e983d320e6 ddl: Allow create timestamp default 0 without sql_mode NO_ZERO_DATE (#30305) (#30507)
close pingcap/tidb#30305
2021-12-28 12:57:49 +08:00
529ce88c1c *: add TxnManager to manage txn in session (#30574)
* *: add TxnManager to manage txn in session

* modify

* add tests

* move failpoint content to a single file
2021-12-22 13:53:43 +08:00
fe1aaf2fd7 topsql: introduce stmtstats and sql execution count (#30277) 2021-12-21 15:43:47 +08:00
4e61d1626a topsql: reduce data race of sql digest (#30296) 2021-12-01 17:31:54 +08:00
8ace8f612e planner: revise optimize trace logic (#30163) 2021-11-29 19:27:52 +08:00
8550dbb216 *: add cardinality estimation trace for Selectivity (#29883) 2021-11-29 17:01:52 +08:00
fe5733ce41 planner: support dump file for trace plan statement (#30059) 2021-11-25 16:19:50 +08:00
b11171aa71 topsql: distinguish the row and index operation type (#29044) 2021-11-24 10:17:51 +08:00
a4bd02e35c planner: add optimizer trace framework for logicalOptimize (#29559) 2021-11-12 12:35:06 +08:00