Commit Graph

162 Commits

Author SHA1 Message Date
97f66c3fec *: use tidb version to decide insert internal DDL into queue or table (#36782)
close pingcap/tidb#36761
2022-08-02 21:12:06 +08:00
c060208b2f *: move config file option oom-use-tmp-storage to sysvar (#36679)
ref pingcap/tidb#33769
2022-08-02 16:58:05 +08:00
58dae93f44 ddl: wait until there is an owner in the cluster (#36664)
close pingcap/tidb#36659
2022-07-28 19:43:11 +08:00
5c42aae575 upgrade: add a variable to make insert ddl job force to queue (#36614)
close pingcap/tidb#36601
2022-07-27 17:33:12 +08:00
9d0f5f72d3 *: enable pessimistic transaction on unistore (#36578) 2022-07-26 21:07:10 +08:00
b0c6c5afa7 *: cleanup default sysvar value usage (#36487)
close pingcap/tidb#36485
2022-07-26 19:51: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
2193bfe3b7 *: remove system var tidb_enable_change_multi_schema (#36167)
ref pingcap/tidb#14766
2022-07-14 10:37:05 +08:00
b40fc86538 session, sessionctx/variable: ensure sysvars are always in lower case (#35659)
close pingcap/tidb#35658
2022-07-06 16:49:02 +08:00
65e0b8e541 client: KV requests with source label (#34833)
close pingcap/tidb#33963
2022-07-01 19:46:39 +08:00
193f04db70 session,sessionctx: enable tidb_enable_paging by default (#35275)
close pingcap/tidb#35273
2022-06-23 08:32:37 +08:00
3b34234ecf session: improve bootstrap code (#34755)
close pingcap/tidb#34754
2022-06-22 00:06:36 +08:00
48ffa7dec7 config, session: fix import of old variable values (#34896)
close pingcap/tidb#34877
2022-05-26 16:04:47 +08:00
388b3c79cc session: fix upgrade process for bootstrap v90 (#34862)
close pingcap/tidb#34847
2022-05-22 12:18:44 +08:00
0cbccb74f3 *: move config file options prepared-plan-cache.* to sysvars (#34790)
close pingcap/tidb#30168, ref pingcap/tidb#33769
2022-05-19 16:18:39 +08:00
2106361d27 config, session: add upgrade to version90 in bootstrap.go (#34711)
ref pingcap/tidb#33769
2022-05-19 10:44:39 +08:00
a9614850f9 *: move config file option oom-action to sysvar (#34644)
ref pingcap/tidb#33769
2022-05-19 05:16:38 +08:00
eae2ae84f4 *: move config file option tidb_enable_auto_analyze to sysvar (#34643)
ref pingcap/tidb#33769
2022-05-19 02:34:38 +08:00
bbfbe137eb *: move config file option enable-batch-dml to sysvar (#33803)
ref pingcap/tidb#33769
2022-05-13 22:12:37 +08:00
a58e519055 *: change mysql.analyze_jobs.instance column type (#34542)
close pingcap/tidb#34543
2022-05-11 11:14:34 +08:00
6d8669e987 *: Add support for GET_LOCK() / RELEASE_LOCK() / RELEASE_ALL_LOCKS() (#33947)
close pingcap/tidb#14994
2022-04-29 23:12:53 +08:00
d22a8ce409 session: fix upgraded cluster mysql.user columns order is different from new cluster (#33868)
close pingcap/tidb#33650
2022-04-28 01:12:55 +08:00
1a19f959f4 session, table: fix listColumnPartition data race (#33199)
close pingcap/tidb#33030
2022-04-27 15:20:51 +08:00
20a58199cf *: move config file option mem-quota-query to sysvar (#34141)
ref pingcap/tidb#33769
2022-04-26 03:58:50 +08:00
0f4706418e *: track cluster-level analyze jobs and make it persistent (#32215)
close pingcap/tidb#32403
2022-03-31 21:06:29 +08:00
e15e6d0358 session: fix tables_priv table schema (#33599) 2022-03-30 23:28:49 +08:00
5c931aadc8 Revert "topsql: enable topsql feature by default (#33195)" (#33493)
close pingcap/tidb#33492
2022-03-28 22:44:27 +08:00
44cf3986e3 topsql: enable topsql feature by default (#33195)
close pingcap/tidb#33194
2022-03-17 15:26:31 +08:00
4cb1b94cc7 bootstrap: correctly increment the bootstrap version (#33184)
close pingcap/tidb#33163
2022-03-17 14:52:31 +08:00
e87bb52a6a bindinfo: refactor some codes in bindinfo package (#33094) 2022-03-15 20:55:23 +08:00
a1d8f2f3ac *: remove ddl dependency (#32910)
ref pingcap/tidb#31716
2022-03-09 08:15:48 +08:00
4be9e30b0a bindinfo: rename Using status to Enabled status (#32801)
ref pingcap/tidb#32466
2022-03-07 17:21:49 +08:00
fc6b939ecc planner: introduce historical meta stats auto-dump (#32041)
ref pingcap/tidb#18745
2022-03-03 19:05:47 +08:00
9c64224c49 *: Reduce data inconsistencies (#31547)
ref pingcap/tidb#26833
2022-02-11 13:51:36 +08:00
4bda04f15c planner: introduce historical statistic dumping triggered by analyze (#31032)
close pingcap/tidb#18745
2022-01-21 16:35:46 +08:00
acff9c3cff *: Change stmt summary and capture plan baselines to GLOBAL only (#30756) 2022-01-12 13:29:42 +08:00
088a2444df *: persist analyze options for manual and auto analyze (#30939) 2021-12-30 00:39:49 +08:00
807ca05230 sessionctx: enable IndexMerge by default (#30650)
close pingcap/tidb#29597
2021-12-27 12:19:49 +08:00
866c5514af session: fix bootstrap to only persist global variables (#30593)
close pingcap/tidb#28667
2021-12-19 22:21:45 +08:00
d660e483c2 sessionctx: fix the value of analyze_version when upgrading 4.x to 5.… (#30743) 2021-12-15 21:12:34 +08:00
9a074f1dbe *: use the real StateRemote interface implementation for cached table (#30066) 2021-12-10 16:55:57 +08:00
55a38a1c76 *: tiny clean up the RecordSet NewChunk() method (#29232) 2021-11-02 20:02:51 +08:00
da76e34953 *: add support for --initialize-secure and --initialize-insecure (#28487) 2021-10-27 14:38:49 +08:00
de9b5cbb05 session, statistics: fix "data too long for column 'xxx_bound'" when analyze tables with very long strings (#28800) 2021-10-25 19:50:48 +08:00
ab0d231d9e session: add system table mysql.column_stats_usage (#27849) 2021-10-18 19:24:43 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
6eb02fbe5e session: support references on column (#28546) 2021-10-07 12:23:22 +08:00
680de922ed *: fix license header (#28085) 2021-09-17 22:26:41 +08:00
75ee932f00 session: update Host type to char(255) in mysql.* tables for compatible with mysql-8.0 (#27887) 2021-09-13 11:18:39 +08:00
6267e0fbe3 session: change the global variable tidb_stmt_summary_max_stmt_count value from 200 to 3000 when upgrade (#27321) 2021-09-10 21:58:39 +08:00