Skip to content
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

corp: support batch coprocessor for tikv to reduce task and RPC numbers #39361

Open
4 tasks done
cfzjywxk opened this issue Nov 24, 2022 · 5 comments
Open
4 tasks done
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@cfzjywxk
Copy link
Contributor

cfzjywxk commented Nov 24, 2022

Enhancement

Currently, in some web3 index lookup queries, the fanout issue may introduce latency and cost problems. Batching is a common way to reduce task and RPC numbers, and thus possibly reduce latency, cost, and parameter tuning work.

RFC

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Dec 2, 2022

It seems paging is disabled in batch cop, why?

@windtalker
Copy link
Contributor

TiFlash already has BatchRequest and BatchCoprocessor in kvproto, why not just reuse/enhance that?

@cfzjywxk
Copy link
Contributor Author

cfzjywxk commented Dec 2, 2022

It seems paging is disabled in batch cop, why?
@XuHuaiyu
In the current stage, the aim is to resolve the fanout issue, more tests and investigations are needed to make it work with other features like adaptive concurrency and paging.

@cfzjywxk
Copy link
Contributor Author

cfzjywxk commented Dec 2, 2022

TiFlash already has BatchRequest and BatchCoprocessor in kvproto, why not just reuse/enhance that?

@windtalker The requirements are different and separating them may make development and maintenance easier.

@windtalker
Copy link
Contributor

TiFlash already has BatchRequest and BatchCoprocessor in kvproto, why not just reuse/enhance that?

@windtalker The requirements are different and separating them may make development and maintenance easier.

OK, maybe you should use another name because now batch coprocessor means batch coprocessor to TiFlash, it may make reader/developer confusing if there are two batch coprocessor with completely different meanning.

ti-chi-bot added a commit that referenced this issue Jan 12, 2023
* br: add retry for azblob read file (#39650)

close #39649

* copr: fix data race in the mppIterator (#39772)

close #39771

* testkit: set GOMAXPROCS in test (#39766)

* statistics: support download history stats from stats_history (#39701)

* *:  Support Failed-Login Tracking and Temporary Account Locking (#39322)

close #38938

* ddl: mark the writes from delete-only and drop them on merge (#39796)

close #39731

* fix: update ioutil func&pruning case (#39798)

* dumpling: meter network usage (#39774)

close #39674

* staleread: fix flaky test TestStaleReadProcessorWithExecutePreparedStmt (#39805)

close #39804

* domain: fix data race in the MockInfoCacheAndLoadInfoSchema (#39802)

close #39801

* *: upgrade rules_go (#39797)

* *: Add backfill job related tables and operations  (#39616)

close #37122

* ttl: implement ttl job schedule framework (#39472)

close #39471

* *: stable tiflash test in ddl (#39825)

close #39831

* planner: fix index prefix matching (#39377)

close #14581

* parser: add cast to array and member of support (#39820)

close #39821

* fix: update ioutil.readall (#39850)

* planner:  add three fields to statement summary table (#39828)

ref #39199

* ddl: fix unexpect fail when create expression index (#39822)

close #39784

* ttl: ouput TTL comment format when show create table (#39853)

close #39852

* dumpling: add enable paging for tidb server (#39791)

close #39790

* planner: support explain format='cost_trace' on model ver2 (#39840)

ref #35240

* ttl, variables: add system variables for ttl job schedule (#39727)

close #39725

* *: fix slow query nil pointer panic when get session for TTL (#39865)

close #39864

* ttl: Add metrics for TTL (#39849)

close #39848

* statistics: support gc outdated historical stats (#39788)

* planner: rename `general plan cache` to `non-prepared plan cache` (#39873)

* planner: rename 'tidb_enable_general_plan_cache' and 'tidb_general_plan_cache_size' to 'tidb_enable_non_prepared_plan_cache' and 'tidb_non_prepared_plan_cache_size'

* planner: binding from cluster statements summary (#39737)

ref #39199

* ttl: modify default value of `tidb_ttl_delete_batch_size` to 100 (#39878)

close #39877

* ddl: close lightning writers after the import is complete (#39879)

close #39800

* store/copr: handle region error from client (#39838)

ref #39361

* ttl: fix scan workers shrink (#39860)

close #39859

* docs: fix typos (#39870)

* domain: support dump sql meta in plan replayer (#39863)

close #39883

* SlowLog: Update `Wait_TS` field in slow log for every sql  (#39843)

close #39713

* session: fix a bug for InitDDLJobTables (#39861)

ref #39854

* ttl: reschedule scan tasks after update task state (#39891)

close #39890

* ttl: TTL support split scan ranges for some primary key with more than one columns (#39896)

close #39895

* *: add dependabot (#39229)

* expression: support `json_overlaps` function (#39867)

ref #39866

* executor, planner: `InitLogger` before `CreateMockStore` in tests to avoid data race (#39900)

close #39892

* statistics: add source column for stats_meta_hisotry table (#39835)

* ttl: fix ttl txn will not return error when rolling back (#39918)

close #39917

* expression: close recordset (#39899)

* br: make more sane variables of ticking timeout (#39887)

close #39620

* expression: support `member of` function (#39880)

ref #39866

* br: fix err overwrite (#39935)

close #39934

* ttl: add log in the whole lifecycle of a job (#39931)

close #39930

* ttl: use optimistic transaction with 0 retry limit for ttl (#39924)

close #39923

* ttl: periodically update state for a job in heartbeat (#39939)

close #39938

* parser: support syntax set binding status by sql digest  (#39515)

ref #39199

* *: lock row keys during merging back from temp index (#39936)

close #39929

* ttl: initialize notifyStateCh in ttl job manager (#39956)

close #39955

* domain, statistics: periodically update stats healthy distribution (#39739)

close #39349

* ttl: enable 1pc for ttl delete (#39958)

close #39957

* docs/design: format the name of 'Adding-Index-Acceleration' RFC. (#39952)

* *: fix auto analyze worker crash when killed by global memory limit (#39946)

close #39947

* doc: add a proposal for foreign key (#35982)

* domain: Support plan replayer continus capture (#39926)

* expression, json: fix cast json as string with shorter length (#39970)

close #39963

* sessionctx, executor: fix failure of reading MaxPreparedStmtCount (#39736)

close #39735

* resourcemanger: create cpu monitor  (#39962)

ref #39657

* *: prevent cursor read from being cancelled by GC (#39950)

close #39447

* dumpling: supports foreign key limitations (#39914)

close #39913

* build(deps): bump golang.org/x/net from 0.2.0 to 0.4.0 (#39996)

* planner: fix pessimistic-auto-commit not working for point plans (#39993)

close #39928

* fix: ebs volume restore failure since incorrect unfinished volumes (#39975)

close #39974

* planner, json: restore cast flag after substitute column in cast (#39997)

close #39806

* staleread, session: internal write request should be accepted with external ts (#39967)

close #39966

* *: revert 38302, forbid modify column on partition table (#39991)

ref #39915, ref #39922

* executor: close recordset again (#40010)

* ddl: retry prepare RPC when meets region error (#39834)

close #39836

* metrics: add EMA cpu usage (#39995)

close #40029

* executor: fix unstable TestMaxPreparedStmtCount (#40024)

ref #39735

* *: support sample for compressed files for adjustment (#39680)

ref #38514

* docs: fix 'enable_global_index' to 'enable-global-index' (#40009)

* expression: introduce `cast(... as ... array)` in expression index (#39992)

close #40045

* planner: fix the issue that NonPrep Cache cannot work with Explain well (#40044)

close #40039

* ddl: fix waiting for wrong schema version if TiDB server restart (#39985)

close #39981

* *: Fix issue 39999, used wrong column id list for checking partitions (#40003)

close #39999

* oomtest: add whitelist for oom test to fix flaky test (#40055)

close #40054

* *: extend skyline pruning diagnostic info and add extra warnings (#39894)

ref #39893

* ddl: add privilege check when alter table add foreign key (#40051)

close #40050

* planner: add more test cases for non-prep plan cache (#40060)

* sessionctx: disable gc aware memory track (#40019)

close #39971

* *: make auto-analyze killable by global memory limit (#39978)

ref #39971, close #39994

* cpu: fix ticker to avoid close early (#40036)

ref #40029

* build(deps): bump golang.org/x/time from 0.2.0 to 0.3.0 (#39912)

* ddl: use latest ts to read record for adding index (#40081)

close #40074

* executor: close recordset again (#40073)

* planner: add more test cases for MPP hints (#39933)

* planner: support set binding status by sql digest (#39517)

ref #39199

* ddl: check the limitation when creating multi-valued index  (#39818)

close #40086

* sysvar: allow modifying 'tidb_allow_remove_auto_inc' when SEM is ON (#40083)

close #38238

* *: fix issue of multi-schema change with foreign key (#40042)

close #40037

* planner: check the `ignore-plan-cache` hint in insert-stmt (#40080)

ref #39717, close #40079

* parser: support keep_order and no_keep_order hint (#39965)

ref #39964

* *: filter particularly errors when `truncateAsWarning` is true (#40078)

* metrics: add metrics for ema cpu metrics and GOGC (#40049)

close #40092

* server: avoid reusing cached stmt ctx on cursor read (#40023)

close #39998

* *: optimize mpp probe (#39932)

close #39686

* statistics: fix the sync load sql did'nt running internally (#40087)

close #39511

* server: support download plan replayer continues capture file (#40085)

* *: support foreign key check/cascade when execute replace into statement (#40069)

close #40068

* ddl: fix issue of add foreign key too slow in big table (#40112)

close #40111

* ddl: fix issue of partition table with foreign key and add more test case (#40122)

* parser: fix cast function restore (#40129)

close #40130

* ddl: set context correctly in the setDDLLabelForDiagnosis (#40090)

close #40099

* planner: move code of generating IndexMergePath to a separated file (#40134)

* statistics: fix incorrect datetime value when loading stats (#40084)

close #39336

* ttl: escape parameters for finish job sql (#40118)

close #40115

* ddl: prohibit change name of partitioning column (#40147)

close #40135

* lightning: disable foreign key checks (#40032)

close #40027

* br: recursive split batch create table when restore failure on batch create table (#39829)

close #39029

* store/copr: don't reset concurrency of analyze req to 2 (#40168)

close #40162

* build(deps): bump golang.org/x/oauth2 from 0.2.0 to 0.3.0 (#40140)

* domain: revise plan replayer process log (#40126)

* expression: impl cast as array function (#40076)

close #40128

* session: fix tidb_enable_gc_aware_memory_track after upgrade (#40173)

ref #39971, close #40174

* restore: Fix prealloc (#40176)

close #40177

* metrics: remove Keep Alive OPM metric (#40142)

close #40143

* util: fix data race in the cpu test (#40154)

close #40125

* executor: move some test into writetest  (#40097)

* planner: fix an unstable explain test case  (#40199)

ref #35240

* ddl: Refine the error message to compatible with MySQL when drop a partition table partition key column (#38740)

close #38739

* executor: TiFlash supports stale read (#40048)

close #40047

* ddl: ignore internal http client goroutine in leak tests (#40190)

close #40183

* ddl: add more foreign key test case (#40052)

close #40189

* *: add support for -initialize-sql-file on first bootstrap (#35625)

close #35624

* *: fix PointGet will return an stale value when `tidb_enable_plan_replayer_capture` is set (#40197)

close #40194

* planner: support converting `json_member_of` to IndexMerge to access MVIndex (#40175)

ref #40191

* planner: record reasons when skipping Plan Cache (#40210)

* session: Do not run telemetry loops when it's disabled in config (#40156)

close #40155

* docs/design: REORGANIZE PARTITION design (#38246)

ref #15000, ref #15002

* ddl: Disable RENAME COLUMN for partitioning columns | tidb-test=pr/2054 (#40151)

close #40150

* dumpling: add foreign key e2e test (#40133)

close #40227

* ttl: make the TTL compatible with dumpling, lightning and BR  (#40216)

close #40215

* ttl, domain: setup a customized session pool with stats collector (#40171)

close #40109

* ddl: Support flashback cluster with ddl history (#40209)

ref #40026

* lightning: add foreign key test (#40103)

close #40226

* planner: refine planner code for disaggregated tiflash mode (#39813)

close #39814

* docs: update tidb roadmap based on v6.5 (#40170)

* planner: remove the unnecessary skip-plan-cache flag in StmtCtx (#40235)

* ttl: fix change status sql argument (#40234)

close #40231

* planner: update the plan cache strategy when expressions with parameters affect null-check (#40218)

close #38205, close #40093

* go.mod: upgrade badger to 20221229114011 (#40236)

close #39237

* executor: write multi-valued index (#40172)

close #40207

* expression: implement `unhex` function pushdown to tiflash (#39898)

ref #5112, ref pingcap/tiflash#5112

* planner: remove the unnecessary skip-plan-cache flag in StmtCtx (#40246)

* restore: set config value to default when failed to get config from tikv (#36051)

close #36053

* ddl: check default value again in updateColumnDefaultValue (#40230)

close #40164

* docs: update roadmap (#40244)

* *: remove the support of the old ddl framework (#39684)

ref #39824

* lightning: check peers write stall when switch-mode is disabled (#40228)

close #40163

* ddl, parser: make generated column and expression index same as MySQL (#39888)

close #39826

* session: make plan replayer capture support prepared stmt (#40167)

close #40161

* expression: implement `regexp_replace` function pushdown (#40267)

close #40266

* planner: supply more test for binding from history (#40242)

ref #39199

* ttl: disable ttl job when recover/flashback table/database/cluster (#40268)

close #40265

* admin: impl admin check index for mv index (#40270)

close #40272

* planner: refactor plan-cache UseCache flag (#40256)

ref #36598

* test: fix data race in cast as array (#40277)

close #40276

* planner: support converting `json_overlaps/contains` to IndexMerge to access MVIndex (#40195)

ref #40191

* autoid_service: add unit test for the package (#40193)

* executor: special handling is required when an "auto id out of range" error occurs in `insert ignore into ... on on duplicate ...` (#39847)

close #38950

* util: gorotinue pool (#39872)

close #38039

* metrics: add metrics for plan replayer and historical stats (#40271)

* sysvar: fix circular dependency in rebuildSysVarCache leading to deadlock (#40283)

close #40240

* ddl: fix flaky test TestGlobalVariablesOnFlashback (#40291)

close #40287

* server, tidb-server: kill auto analyze when gracefully shutting down (#40284)

close #40038

* planner: better coordination between the ignore_plan_cache() binding and plan-cache (#40280)

close #40225

* store/copr: fix build batchCop in disaggregated tiflash mode (#40008)

close #40035

* ddl: persist index info after changing backfill state (#40229)

close #40217

* doc: update flashback doc (#40031)

ref #40026

* ddl, parser: Implement the write-reorg state split task related functions, and the related interfaces of backfill worker (#39982)

close #37123

* planner: support pushing down predicates to memory tables in prepared mode (#40262)

close #39605

* planner: open the partial order prop push down for LIST PARTITION (#40290)

close #40273

* br: fix bootstrap domain (#40307)

close #40281

* br: add errch buf for checkpoint (#40166)

close #40165

* planner: skip plan-cache for prepared queries with `INT in (Decimals...)` (#40312)

close #40224

* statistics: support historical stats dump partition table (#40310)

* *: update badger (#40331)

* expression: enlarge timeout for test (#40332)

* resourcemanger: add cpu scheduler (#39886)

close #39657

* util: use go-deadlock to find deadlock (#40288)

close #40293

* *: support `curdate()` as column's default value  | tidb-test=pr/2057 (#40326)

close #38356

* ttl: don't schedule ttl job when EnableTTLJob is off (#40336)

close #40335

* *: add warnings to slow log and slow query table (#39884)

ref #39893

* planner,infoschema,executor: Add tiflash fine grained shuffle support for hash join and aggregation (#40121)

close #40123

* ddl: fill in original default for extra writable columns in batch insert (#40198)

close #40192

* ddltest: update goleak and enable race (#40357)

close #40358

* planner: let the planner can select IndexMerge on MVIndex without hint (#40347)

ref #40191

* makefile: enable deadlock in the with-real-tikv (#40359)

close #40293

* planner: support more types to use IndexMerge to access MVIndex (#40343)

ref #40191

* log-backup: should set default value `gc.ratio-threshold` after pitr finished (#40141)

close #40185

* domain: let plan replayer dump support recording stats mem status (#40334)

* docs: add TiDB Forum link and adjust link order (#39868)

* ddl: support online create multi-valued index (#40304)

close #40337

* ttl: add `ttl_job_interval` attribute and remove `tidb_ttl_job_interval` variable (#40033)

close #40028

* *: remove the support of the `amending transaction` (#39714)

close #40381

* executor: reset the related session vars for both INSERT and REPLACE (#40354)

close #40351

* *: fix static pruning partition table in disaggregated tiflash mode (#40238)

close #40239

* planner: fix typo (#40367)

* session: fix data race in the LazyTxn.LockKeys (#40350)

close #40355

* build(deps): bump golang.org/x/crypto from 0.1.0 to 0.5.0 (#40379)

* executor: fix data race at the ShowExec (#39817)

close #39816, close #40295

* planner: fix panic during starting tidb-server if creating global binding for partition table (#40402)

* fix

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* *: Supports create/alter/drop resource group (#40188)

ref #38825

* session: fix deadlock when init domain failed (#40409)

close #40408

* executor: support insert ignore/duplicate replace into with unique multi-valued index (#40369)

close #40207

* br: support reset_tiflash after ebs restoration (#40124)

close #40208

* ttl: add ttl goroutine exit log (#40416)

close #40415

* planner, executor: split the range for unsigned pk of partition table when limit is used (#40313)

close #40309

* planner: add nil check when handling empty charset in `setUnionFlen` (#40429)

close #40285

* planner: support keep_order and no_keep_order hint (#40089)

ref #39964

* planner: unify the behavior of prepare/execute limit to mysql (#40360)

ref #40219

* gpool: register gpool into resource manager (#40410)

ref #40412

* ttl: Add `CommandClient` to trigger TTL job manually (#40346)

close #40345

* ttl: make ttl's group in granfana collapse by default (#40444)

* br: reset cloud_admin and root after ebs restoration (#39986)

close #40418

* ddl: support displaying sub-job reorg type in admin show ddl (#40387)

close #40386

* planner: support use IndexMerge to access composite MVIndex (#40426)

ref #40191

* planner: add test cases for keep_order and no_keep_order hints (#40321)

ref #39964

* statistics: change the upper bound of the out-of-range estimation to modify count | tidb-test=pr/2012 (#39011)

close #39008

* docs: update CI build badages (#40324)

close #40325

* planner: update the non-prep cacheable checker (#40446)

close #40296

* expression, planner: exclude concat_ws from aggresive folding constant (#38383)

close #36888

* keyspace: introduce keyspace conf and etcd path (#40269)

ref #40425

* ddl: skip deleting the unmatched index key on merge (#40465)

close #40464

* Merge pingcap/master and pingcap/feature/reorganize-partition

* Updated CODEOWNERS for the feature branch

* ci: add document about some task that will be triggered manually (#40459)

* errno, store: fix ErrPDServerTimeout arguments (#40468)

close #40439

* ttl: fix the TTL job reports error when primary key contains a column with type `ENUM` (#40457)

close #40456

* planner: support using DNF to construct IndexMerge to access MVIndex (#40471)

* fixup

* fixup

* fixup

* executor: add partition table testcase for historical stats (#40453)

* add partition table testcase

* add partition table testcase

* fix lint

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* ttl: forbid creating/altering a table with TTL options when pk contains float/double column (#40487)

* ttl: forbid create/alter a table with TTL options when pk contains float/double column

* format

* update

* update

* update

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* planner: make MVIndex be compatible with the `use/force index` hint (#40495)

* fixup

* fixup

* fixup

* fixup

* lightning: fix codecPDClient (#40496)

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>

* ddl: let concurrent truncate on the same table depend on the previous one (#40501)

* done

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

* refine test

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* statistics: fix estimation error when ranges are too many and modify count is large (#40472)

* fix

* fmt

* bazel update

* update test result

Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* executor: fix issue of KEY_COLUMN_USAGE table return wrong result about foreign key column (#40491)

Signed-off-by: crazycs520 <crazycs520@gmail.com>

Signed-off-by: crazycs520 <crazycs520@gmail.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* sysvar: add switch for plan replayer capture using historical stats (#40492)

* add switch

* fix

* fix

* fix

Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* *: upgrade go1.19.5 (#40483)

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

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* br: need init MDL variable when GetDomain (#40512)

Signed-off-by: joccau <zak.zhao@pingcap.com>

Signed-off-by: joccau <zak.zhao@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* ddl: avoid commit conflicts when updating/delete from mysql.tidb_ddl_reorg. (#38738)

* Added test case

* ddl fix #38669.

The issue was that mysql.tidb_ddl_reorg table was updated by an
inner transaction after the outer transaction started,
which then made a commit conflict in the outer transaction,
when it deleted the same row.

* Fixed typo in comment

* Added test case for #24427

* Disabled tests for CI testing

* Revert "Disabled tests for CI testing"

This reverts commit 17c28f3.

* Revert "Revert "Disabled tests for CI testing""

This reverts commit 65c84d9.

* removed test skips

* Clean up the tidb_ddl_reorg entry after DDL is completed

* Use a cleanup job afterwards instead.

* Fixed test

* Moved cleanup before asyncNotify

* More detailed test failure log

* Refined test error message

* Injecting timoeut to get stack traces from CI

* Updated Debug Dump on timeout

* Delete mulitple entries in tidb_ddl_reorg if needed

* Linting

* Linting

* Added CI debug logs

* Linting + CI debugs

* fixed CI debug

* Try to cleanup also if job.State == synced

* check for non-error of runErr instead of error...

* Use a new session, instead of reusing worker.sess

* Also handle case when job == nil

* Removed CI debug logs

* Misssed change session from w.sess to newly created sess

* Improved TestConcurrentDDLSwitch and added CI debug logs

* Always cleaning up all orphan mysql.tidb_ddl_reorg entries

* linting

* Also cleanup if job is nil

* Updated TestModifyColumnReorgInfo + CI debug logs

* more CI debug

* refactored the cleanupDDLReorgHandle code

* Added missing cleanup in handleDDLJobQueue

* Removed debug panic

* Code cleanup

* Test updates

* Debug cleanup

* Cleaned up test after removal of old non-concurrent DDL code merge

* Linting

* always wrap changes to tidb_ddl_reorg in an own transaction

+ fixed some typos

* Minimum fix

* Always update reorg meta, not only on error

* Issue is here :)

* Fixed newReorgHandler

* Wrapped more tidb_ddl_reorg changes into separate transactions

* linting

* Removed updateDDLReorgStartHandle

* cleanups

* Made runInTxn a method on *session, instead of normal function

* Update test

* Final touches

* Removed duplicate test

* CleanupDDLReorgHandles should only be called from HandleJobDone.

* Variable rename

* Renamed 'delete' variabel name

* Updated test

* small revert

* Removed timeout debugging code

* Simplified the cleanup to only start a new txn and not a new session

* Reverted the change of GetDDLInfo

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>

* Post merge fix

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
Signed-off-by: crazycs520 <crazycs520@gmail.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: joccau <zak.zhao@pingcap.com>
Co-authored-by: Jianjun Liao <36503113+Leavrth@users.noreply.github.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Song Gao <disxiaofei@163.com>
Co-authored-by: lastincisor <64511824+lastincisor@users.noreply.github.com>
Co-authored-by: tangenta <tangenta@126.com>
Co-authored-by: Bin <49082129+songzhibin97@users.noreply.github.com>
Co-authored-by: Obliviate <756541536@qq.com>
Co-authored-by: Lynn <zimu_xia@126.com>
Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
Co-authored-by: Daniël van Eeden <git@myname.nl>
Co-authored-by: xiongjiwei <xiongjiwei1996@outlook.com>
Co-authored-by: fzzf678 <108643977+fzzf678@users.noreply.github.com>
Co-authored-by: Hangjie Mo <mohangjie1995@gmail.com>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>
Co-authored-by: Chunzhu Li <lichunzhu@stu.xjtu.edu.cn>
Co-authored-by: Yuanjia Zhang <zhangyuanjia@pingcap.com>
Co-authored-by: you06 <you1474600@gmail.com>
Co-authored-by: raymonder jin <rayjingithub@gmail.com>
Co-authored-by: TonsnakeLin <87681388+TonsnakeLin@users.noreply.github.com>
Co-authored-by: Zhou Kunqin <25057648+time-and-fate@users.noreply.github.com>
Co-authored-by: 山岚 <36239017+YuJuncen@users.noreply.github.com>
Co-authored-by: Yifan Xu <30385241+xuyifangreeneyes@users.noreply.github.com>
Co-authored-by: bb7133 <bb7133@gmail.com>
Co-authored-by: Xiaoju Wu <wuxiaoju@pingcap.com>
Co-authored-by: crazycs <crazycs520@gmail.com>
Co-authored-by: zyguan <zhongyangguan@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fengou1 <85682690+fengou1@users.noreply.github.com>
Co-authored-by: wjHuang <huangwenjun1997@gmail.com>
Co-authored-by: mychoxin <mychoxin@gmail.com>
Co-authored-by: Chengpeng Yan <41809508+Reminiscent@users.noreply.github.com>
Co-authored-by: CbcWestwolf <1004626265@qq.com>
Co-authored-by: hackersean <hackersean@users.noreply.github.com>
Co-authored-by: Yujie Xia <xiayjchn@gmail.com>
Co-authored-by: jiyfhust <jiyfhust@163.com>
Co-authored-by: hehechen <chentongli@pingcap.com>
Co-authored-by: Morgan Tocker <mtocker@squareup.com>
Co-authored-by: Xiaoguang Sun <sunxiaoguang@users.noreply.github.com>
Co-authored-by: guo-shaoge <shaoge1994@163.com>
Co-authored-by: Ran <huangran.alex@gmail.com>
Co-authored-by: baishen <baishen2009@gmail.com>
Co-authored-by: lance6716 <lance6716@gmail.com>
Co-authored-by: xzhangxian1008 <xzhangxian@foxmail.com>
Co-authored-by: tiancaiamao <tiancaiamao@gmail.com>
Co-authored-by: Jk Xu <54522439+Dousir9@users.noreply.github.com>
Co-authored-by: djshow832 <zhangming@pingcap.com>
Co-authored-by: Yiding Cui <winoros@gmail.com>
Co-authored-by: yibin <huyibin@pingcap.com>
Co-authored-by: Zak Zhao <57036248+joccau@users.noreply.github.com>
Co-authored-by: luzizhuo <496521310@qq.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: 3pointer <luancheng@pingcap.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
Co-authored-by: ystaticy <y_static_y@sina.com>
Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
ti-chi-bot pushed a commit that referenced this issue Feb 8, 2023
lcwangchao added a commit to lcwangchao/tidb that referenced this issue Feb 13, 2023
* statistics: fix data race in the Handle.IsTableLocked (pingcap#40572)

close pingcap#40567

* executor,store/copr: trace the buildCopTask and limitExec close duration when it's slow (pingcap#40579)

ref pingcap#40441

* planner: prepared plan cache support cached plan with placeholder in limit clause (pingcap#40196)

ref pingcap#40219

* planner: refactor to put all plan-cacheability-check functions together (pingcap#40625)

ref pingcap#36598

* testkit: reset the resource manager after test finishes (pingcap#40638)

* planner: disable plan-cache for plans with IndexMerge accessing Multi-Valued Index (pingcap#40646)

ref pingcap#40191

* test: add more foreign key test (pingcap#40650)

close pingcap#40649

* ddl: Block change column on partitioned table if data needs change. (pingcap#40631)

close pingcap#40620

* planner: show un-cacheable reasons for execute statements (pingcap#40651)

ref pingcap#36598

* ddl: cancel `create view` job , when failed to drop old view (pingcap#40353)

close pingcap#40352

* domain: use enhanced waitGroupWrapper in domain pingcap#40606 (pingcap#40626)

ref pingcap#40330

* privilege,planner/core: add dynamic privilege RESOURCE_GROUP_ADMIN for resource group operation (pingcap#40632)

ref pingcap#38825

* *: add a new I_S table and support show create for resource groups (pingcap#40665)

close pingcap#39781

* meta: add lock at autoid.(*allocator).Base() (pingcap#40588)

close pingcap#40584

* *: Support learner replica read (pingcap#39979)

close pingcap#40449

* Revert "planner: show un-cacheable reasons for execute statements" (pingcap#40680)

ref pingcap#36598

* executor: fix buildTableReaderForIndexJoin on partition table (pingcap#40674)

close pingcap#40596

* util: remove empty folder (pingcap#40681)

* domain: let background process unify wg.Run (pingcap#40640)

* BR: add lock with ttl for checkpoint backup (pingcap#40563)

close pingcap#40561

* *: LOAD DATA support load one file from s3 and other OSS (pingcap#40489)

ref pingcap#40499

* ttl: execute scan tasks (pingcap#40564)

close pingcap#40364

* ddl: fix the batch check for unique index (pingcap#40672)

ref pingcap#40464, close pingcap#40592

* resourcemanager: avoid to get nil after task finished when to stop task (pingcap#40699)

close pingcap#40700

* planner: refactor plan cache value code (pingcap#40656)

ref pingcap#40219

* telemetry: resource control telemetry (pingcap#40687)

ref pingcap#38825

* planner: set binary collation for mv column (pingcap#40644)

close pingcap#40558

* ddl: add some tests for flashback cluster with ddl history (pingcap#40695)

ref pingcap#40026

* pitr: move step iterate backup files into worker pool (pingcap#40577)

close pingcap#40576

* ddl, lightning: support detecting duplicate keys in different batch (pingcap#40701)

close pingcap#40698

* json, expression: add json unary not implementation (pingcap#40723)

close pingcap#40683

* ddl: prevent dropping in-use resource group (pingcap#40716)

ref pingcap#38825

* store/copr: move row hint into key range (pingcap#40105)

ref pingcap#39361

* server, privileges: make tidb_auth_session_token compatible with password expiration and resource group (pingcap#40735)

ref pingcap#40614

* mockstore: update pd/client and client-go to repair kvproto compatibility (pingcap#40597)

close pingcap#40598

* Explain : Add new item in TiFlashScanContext to record region num information (pingcap#40666)

ref pingcap#39273

* *: Setup Global Resource Controller (pingcap#40732)

close pingcap#40731

* tests: enable race and flaky for flashback test (pingcap#40752)

* br: split regions before pitr restore (pingcap#39941)

close pingcap#37207

* log-backup: do not resolve locks frequently when log-backup task did not exist (pingcap#40760)

ref pingcap#40759

* lint: update config of deprecated linter (pingcap#40763)

ref pingcap#40786

* lightning: check hasDupe and tableID when resolve duplicate rows (pingcap#40696)

close pingcap#40657

* planner: skip the plan cache if non-int values are converted into int when optimization (pingcap#40686)

close pingcap#40679

* *: Remove unused binary that was accidentally added (pingcap#40782)

close pingcap#40781

* linter: add skywalking-eyes into bazel (pingcap#40788)

close pingcap#40789

* planner: remove pickFromBucket field in LRUPlanCache (pingcap#40668)

ref pingcap#36598

* statistics: move statsReader out of statistics/handle (pingcap#40790)

ref pingcap#40624, ref pingcap#40791

* linter: find inappropriate key in call to context.WithValue (pingcap#40769)

close pingcap#40796

* ttl: notify tidb nodes through etcd notification (pingcap#40705)

close pingcap#40365

* executor: add foreign key and session variable test (pingcap#40785)

close pingcap#40784

* ttl: add table `mysql.ttl_job_history` to store ttl job histories (pingcap#40655)

close pingcap#40654

* planner: forbid the optimizer to generate point-plan upon MVIndexes (pingcap#40804)

ref pingcap#40191

* planner: refactor some code related to IndexMerge and MVIndex (pingcap#40800)

ref pingcap#40191

* ddl: remove useless code (pingcap#40756)

close pingcap#40755

* ttl: use a standalone manager in TriggerScanTask test (pingcap#40816)

close pingcap#40811

* ddl: split some tests into new package (pingcap#40758)

ref pingcap#40802

* resourcemanager: scheduler subtask in the pool's task (pingcap#40670)

close pingcap#40719

* bazel: upgrade rules_go to prepare for Go 1.20 (pingcap#40776)

close pingcap#40798

* store/copr: add a param "limit" to region cache's `SplitRegionRanges` (pingcap#40411)

close pingcap#38436

* br: fix checkpoint panic when BR executes gain (pingcap#40706)

close pingcap#40704

* sessionctx: add validation for tidb_enable_plan_replayer_continues_capture (pingcap#40787)

* planner: show warnings when analyzing multi-valued indexes (pingcap#40827)

ref pingcap#40191

* ddl: move update version function to a proper place (pingcap#40817)

ref pingcap#40217

* lightning: support timeout for tikv/tidb retry (pingcap#40805)

ref pingcap#33714

* ttl: support telemetry for TTL (pingcap#40806)

close pingcap#40519

* ttl: auto delete old rows in `mysql.tidb_ttl_job_history` (pingcap#40808)

close pingcap#40807

* lightning: support data files with bom header (pingcap#40813)

close pingcap#40744

* planner: support `use / force index` for multi-valued indexes (pingcap#40820)

ref pingcap#40191

* lightning/parser: support STARTING BY (pingcap#40821)

ref pingcap#40499

* planner: add a switch control if prepare stmt with param limit can be cached (pingcap#40712)

ref pingcap#40219

* metrics: add goroutine schedule latency to grafana panel (pingcap#40836)

close pingcap#40835

* server: support getting the MVCC of the temporary index (pingcap#40830)

close pingcap#40826

* planner: let optimizer trace support gcSubstitute (pingcap#40815)

close pingcap#40662

* planner: add more test cases for MVIndex (pingcap#40853)

ref pingcap#40191

* planner: supply test cases for binding from history (pingcap#40864)

ref pingcap#39199

* ddl: unsupport flashback cluster cross `alter table attributes` (pingcap#40862)

close pingcap#40861

* bindInfo: fix datarace on bindings (pingcap#40846)

close pingcap#40843

* executor: add historical stats test and make it enabled (pingcap#40664)

* Variables: enhance tidb_enable_gc_tuner (pingcap#40850)

close pingcap#40849

* ttl: add metrics for task manager (pingcap#40819)

close pingcap#40810

* lightning: enable setting conflict max-error (pingcap#40874)

ref pingcap#40743

* DDL: Skip collecting TiFlash status when TiFlash is down (pingcap#40872)

close pingcap#38484

* server: Return error when no password is specified for caching_sha2_password account with password (pingcap#40858)

close pingcap#40831

* br: fix br debug encode panic (pingcap#40880)

close pingcap#40878

* planner: fix HashAgg cannot pushdown to tiflash_compute (pingcap#40828)

close pingcap#40717

* parser: Fix for field name output in multi statements (pingcap#40736)

close pingcap#39662

* expression, cmd: fix ColumnSubstitute and allow some cases to substitute (pingcap#38826)

close pingcap#38736, close pingcap#40536

* planner: forbid using IndexFullScan on multi-valued indexes (pingcap#40907)

ref pingcap#40191

* lightning: local backend support keyspace (pingcap#40628)

ref pingcap#40531

* README: refine the Forum infomation format in community section (pingcap#40924)

* ttl: don't fetch ttl scan task after it finished (pingcap#40919)

close pingcap#40918

* executor: Fix tidb crash on index merge reader (pingcap#40904)

close pingcap#40877

* util: add InTest to check whether to be in test (pingcap#40927)

close pingcap#40929

* *: upgrade mgechev/revive (pingcap#40920)

* ddl: fix create exists resource group (pingcap#40837)

ref pingcap#38825

* handle: support fallback for dump historical stats (pingcap#40889)

close pingcap#40890

* admin: support cleanup multi-valued index (pingcap#40428)

close pingcap#40427

* *: support MockAutoScaler and AWSAutoScaler (pingcap#40729)

close pingcap#40747

* session: fix bad log (pingcap#40948)

close pingcap#40947

* planner: fix dropping non-ScalarFunction when extractCol for memtable (pingcap#40935)

close pingcap#40937

* planner: supply test cases for param limit in plan cache (pingcap#40868)

ref pingcap#40219

* br: disable foreign key check when br create table (pingcap#40951)

close pingcap#40952

* planner: rename keep_order hint to order_index hint for mysql compatibility (pingcap#40945)

* planner: report the warning when use the hint but the SQL has the binding (pingcap#40949)

close pingcap#40910

* *: add ci image (pingcap#40866)

close pingcap#40867

* metrics: introduce the resource control RU Grafana dashboard (pingcap#40922)

ref pingcap#38825

* planner: add MppVersion for mpp task; support data compression in Exchange Operator; (pingcap#40132)

ref pingcap/tiflash#6620, close pingcap#40494

* *: unify wru,rru to ru (pingcap#40884)

close pingcap#40883

* br: adaption for keyspace feature (pingcap#40532)

ref pingcap#40531

* resourcemange: fix delete more workers than expected (pingcap#40894)

close pingcap#40893

* keyspace: gc delete range (pingcap#40639)

ref pingcap#40848

* ddl: add more tests about multi-valued index (pingcap#40973)

* test: stabilize TestAddIndexMergeConflictWithPessimistic (pingcap#40975)

close pingcap#40939

* *: add UseAutoScaler config to disable AutoScaler (pingcap#40966)

close pingcap#40971

* *: add memory tracker for mppIterator (pingcap#40901)

close pingcap#40900

* resource_group: supports burstable for resource group (pingcap#40925)

close pingcap#40380

* util: fix memory leak in chunk allocator (pingcap#40989)

close pingcap#40987

* ddl, statistics: fix stats meta missing when creating many tables at once (pingcap#38301)

close pingcap#36004, close pingcap#38189

* statistics: move TableStatsFromStorage out of handle (pingcap#40822)

ref pingcap#40624, ref pingcap#40791

* br: remove totalFlashbackRegions since task completion region already contains all regions (pingcap#40504)

close pingcap#40391, ref pingcap#41005

* lightning: fix panic when nextKey twice (pingcap#40959)

close pingcap#40934

* ttl: fix data race in TTL manager and test (pingcap#40976)

close pingcap#40944

* session: use `mDDLTableVersion` key to control backfill tables (pingcap#40984)

close pingcap#40980

* planner: not allow the optimizer to use `json_contains(j, '[]')` as access conditions on MVIndex (pingcap#41013)

ref pingcap#40191

* ddl/ingest: add mutex to disk root (pingcap#41029)

close pingcap#40970

* ttl: avoid endless loop in TTL task schedule (pingcap#41020)

close pingcap#41019

* resourcemanager: fix TaskController.Stop() can't make producer exit in spmcpool (pingcap#41016)

close pingcap#41015

* *: add buildtag for ddltest (pingcap#41027)

* statistics: use histogram count rather than realtime count to calculate stats healthy (pingcap#41031)

* pd_client: update client and global config (pingcap#40955)

ref pingcap#38825

* ddl: show more jobs in the tidb_mdl_view (pingcap#40860)

close pingcap#40838

* *: add resource group name into information_schema.processlist (pingcap#40739)

close pingcap#40724

* *: upgrade golangci-linter (pingcap#41046)

* executor: fix IndexMerge handle panic logic (pingcap#41036)

close pingcap#41047

* ttl: fix TTL will delete unexpected rows when timezone changed (pingcap#41044)

close pingcap#41043

* *: fix the sysvar value may be corrupted after set by subquery (pingcap#41003)

close pingcap#40979

* ddl, parser: implement the normal flow of distributed processing in DDL reorg phase for adding index (pingcap#40542)

close pingcap#37125

* session, metrics: refine the resource control metrics (pingcap#41045)

ref pingcap#38825

* meta: fix remove resource group (pingcap#40968)

ref pingcap#38825

* metrics/grafana: add cpu/memory of pd in overview panel (pingcap#41072)

close pingcap#41071

* lightning: precheck should check CDC changefeeed rather than capture (pingcap#41076)

close pingcap#41040

* ttl: fix ttl job manager will panic if the status cache doesn't contain table (pingcap#41069)

close pingcap#41067, close pingcap#41068

* sessionctx: fix hidden and user var problems in encoding session states (pingcap#40754)

close pingcap#40614

* Revert "planner: skip the plan cache if non-int values are converted into int when optimization" (pingcap#41077)

ref pingcap#41032

* schema cache: cache schema version by timestamp (pingcap#40768)

close pingcap#40740

* executor: fix plan replayer dump for tpcds q97 (pingcap#41088)

close pingcap#41064

* *: update util/tracing and remove repeated code (pingcap#40825)

close pingcap#40809

* telemetry: Log error reason for failure to get SQL Metric (pingcap#40778)

close pingcap#40777

* br: add retry for prepare flashback for backup cluster is empty and there are only one region (pingcap#41059)

close pingcap#41058

* server: Implement column defaults for `mysql.ComFieldList` (pingcap#40765)

close pingcap#40764

* resourcemanager: avoid to schedule when no task is in the pool (pingcap#41095)

close pingcap#41094

* *: Update github.com/cloudfoundry/gosigar (pingcap#41111)

close pingcap#41110

* ddl: remove useless error log (pingcap#41107)

close pingcap#41106

* executor: use const varialbe for index merge handleWorkerPanic (pingcap#41066)

close pingcap#41065

* Optimizer: add test cases for predicate simplifications (pingcap#41117)

ref pingcap#40221

* executor: disable paging for small limit (pingcap#41120)

close pingcap#40741

* flashback: retry `getStoreGlobalMinSafeTS` during execute flashback (pingcap#41100)

close pingcap#41086

* metrics: add tidb_rm_pool_concurrency (pingcap#41113)

close pingcap#41114

* handler: fix duplicated log of unanalyzed table for historical stats (pingcap#41129)

* *: update client-go and pd client (pingcap#41124)

close pingcap#41123

* admin: fix recover expression cause index broken (pingcap#41092)

ref pingcap#40430, close pingcap#41087

* statistics/handle: remove unnecessary h.mu.Lock (pingcap#41153)

* parser: move LOAD DATA REMOTE into LOAD DATA (pingcap#41091)

ref pingcap#40499

* planner: support more pattern for index join inner side (pingcap#40999)

ref pingcap#40505

* planner: support more pattern for index join inner side (pingcap#40999)

ref pingcap#40505

* planner: support more pattern for index join inner side (pingcap#40999)

ref pingcap#40505

* makefile: update dumpling build options (pingcap#41165)

* statistics/handle: refine the condition of dumping stats delta (pingcap#41133)

ref pingcap#36004, ref pingcap#38189, ref pingcap#39785

* *: use the latest independent resource group manager client (pingcap#41162)

ref pingcap#38825

* store/copr: set upper limit for extra concurrency (pingcap#41135)

close pingcap#41134

* planner: label plans as over-optimized for plan cache after refining cmp-function arguments (pingcap#41136)

close pingcap#40679, close pingcap#41032

* planner: when pushing `topN` down below `proj`, check whether `topN.ByItems` contains a column(with ID=0) generated by `proj` (pingcap#40593)

close pingcap#40535

* *: update bazel config (pingcap#41127)

close pingcap#41160

* br: fix br ci (pingcap#41149)

* *: fix a timezone data race which may cause wrong row data (pingcap#41146)

close pingcap#40710

* ddl: disable raw mode resource group (pingcap#41050)

close pingcap#41049

* flashback: make `br backup full` works during `flashback cluster` (pingcap#40950)

close pingcap#40404

* placement: supports survival preferences (pingcap#40613)

close pingcap#38605

* log-backup: added more robust error handling for log backup advancer (pingcap#41083)

close pingcap#41082

* lightning: access aws resource by session token (pingcap#40753)

close pingcap#40750

* lightning: introduce param to skip CSV header parsing (pingcap#41128)

close pingcap#40839

* ddl: forbid tiflash while enabling API v2 (pingcap#41167)

ref pingcap#41166

* store/copr: enable store batch by default & add extra copr concurrency and batch nums in stats (pingcap#40711)

ref pingcap#39361, close pingcap#40399

* *: remove ru token in resource group schema and set brust limit (pingcap#41174)

ref pingcap#38825

* ReplicaReadMode: introduce new replica_read mode `PreferLeader`. (pingcap#40906)

close pingcap#40905

* txn: Fix the issue that analyze panics when aggressive locking is enabled globally (pingcap#41196)

close pingcap#41194

* pitr: prevent from restore point to cluster running log backup (pingcap#40871)

ref pingcap#40797

* lightning: do resolve conflict job when other lightning has local dupes (pingcap#41157)

close pingcap#40923

* executor: track the memroy usage in HashJoin probe phase (pingcap#41081)

close pingcap#40500

* *: support recover multi-valued index (pingcap#41181)

close pingcap#41180

* stmtsummary: add persistence implementation (pingcap#40814)

ref pingcap#40812

* br: Support backup replica read (pingcap#40899)

ref pingcap#40898

* store/copr: add log for buildBatchCopTasksConsistentHash (pingcap#41101)

close pingcap#41102

* lightning: support compression when sending kv pairs to tikv (pingcap#41164)

close pingcap#41163

* planner: skip plan cache if the plan contains Shuffle operators (pingcap#41185)

close pingcap#38335

* expression: implement least/greatest for string function pushdown (pingcap#41188)

close pingcap#41189

* go.mod: update client-go to the latest version (pingcap#41212)

ref pingcap#38825

* add metrics for TTL (pingcap#41155)

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>

* metrics: Add metrics and telemetry for aggressive locking (pingcap#41038)

close pingcap#41037

* planner: adjust estimated row count when pushing `Limit` and keep order for partitioned table (pingcap#41103)

close pingcap#40986

* planner: fix can't find proper physical plan caused by virtual column (pingcap#41132)

close pingcap#41014

* planner: fix space requirement when binding from history (pingcap#41140)

close pingcap#41126

* ddl: initialize the mock session in advanced (pingcap#41227)

close pingcap#40879

* ddl: fix data race on job.SetWarnings (pingcap#41231)

close pingcap#40751

* *: remove limit (pingcap#41242)

* *: remove limit

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

* *: remove limit

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

* *: remove limit

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

---------

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

* br: skip template system table __TiDB_BR_Temporary_mysql when backup (pingcap#41000)

close pingcap#40797

* ddl, model: support for dist-reorg on partitioned tables (pingcap#41145)

close pingcap#41144

* session: fix processInfo time when using driver to prepare and execute query (pingcap#41151)

close pingcap#41057

* dumpling: fix cannot dump data bug when dumpling fails to check has tikv (pingcap#40977)

close pingcap#40932

* lightning: fix panic when user cancel (pingcap#41236)

close pingcap#41235

* util/gpool/spmc: add a sleep to a simple `for` (pingcap#41240)

close pingcap#41205

* planner: fix calculating TiFlash stream count (pingcap#41221)

ref pingcap#40123

* ddl: check the key existence on original index (pingcap#40749)

close pingcap#40730

* types: use `mathutil.Max/mathutil.Min` instead of `myMax/myMin` (pingcap#41192)

* bazel: set --test_keep_going false (pingcap#41247)

* ddl: Add telementry for distributed reorg tasks. (pingcap#41201)

ref pingcap#41266

* ddl: Improve ErrTooLongKey message (pingcap#41270)

Prefix indexes are specified in characters while this error message
returns a limit in bytes. By adding the byte length in the message this
is makes it easier to understand.

This would deviate a little bit from the message in MySQL.

Before:
```
sql> CREATE TABLE t1(id int primary key, c1 text, key(c1(1000)));
ERROR: 1071 (42000): Specified key was too long; max key length is 3072 bytes
```

After:
```
sql> CREATE TABLE t1(id int primary key, c1 text, key(c1(1000)));
ERROR: 1071 (42000): Specified key was too long (4000 bytes); max key length is 3072 bytes
```

* ddl: fix owner get panic info  with dist-reorg (pingcap#41217)

close pingcap#41208

* planner: recover table/schema only needs create and drop privilege (pingcap#41226)

close pingcap#40633

* Lightning: use **** to represent secret key in unit test (pingcap#41269)

close pingcap#41268

* ddl: improve backfill more general (pingcap#41093)

close pingcap#41002

* executor: fix unreasonable CPU time in HashJoin probe phash (pingcap#41265)

close pingcap#41263

* ttl: optimize bazel for TTL codes (pingcap#41278)

close pingcap#41276

* executor: support plan replayer capture remove task (pingcap#41258)

close pingcap#41262

* expression: return upper bound for enum (pingcap#41021)

close pingcap#40855

* lightning: revert db timeout changes for analyze (pingcap#41012)

close pingcap#40941

* *: REORGANIZE PARTITION (pingcap#38535) (pingcap#41096)

close pingcap#38535

* br: fix backup ci (pingcap#41295)

ref pingcap#40404, ref pingcap#40898

* *: reduce the allocation of error constructing in `DecodeTableID` (pingcap#41301)

close pingcap#41300

* util: fix dropped error (pingcap#41254)

* metric: seperate the internal and external transaction metrics (pingcap#41206)

ref pingcap#41203

* planner: fix a bug when pushing streamAgg down (pingcap#41056)

close pingcap#40857

* build(deps): bump golang.org/x/oauth2 from 0.3.0 to 0.5.0 (pingcap#41283)

* Optimizer: derive TopN from filter on row number (pingcap#41209)

ref pingcap#39792

* domain: fix data race in the ttlJobManager (pingcap#41289)

close pingcap#41288

* stmtsummary: fix data race in test (pingcap#41287)

close pingcap#41275

* ddl: return panic when to get tiflash sync progress failed in test (pingcap#41292)

close pingcap#39949

* infoschema: fix is.partitions.partition_expression for range columns (pingcap#41285)

close pingcap#40931

* sysvar: introduce variable tidb_enable_inl_join_inner_multi_pattern (pingcap#41319)

ref pingcap#40505

* executore: fix logic error in HashJoin probe (pingcap#41320)

* *: update bazel config (pingcap#41296)

* infoschema: fix unstable test TestSelectClusterTable (pingcap#41321)

close pingcap#41307

* log-backup: added cache for sst_importer client (pingcap#41305)

close pingcap#41328

* stmtsummary: fix panic in stmts test (pingcap#41334)

close pingcap#41315

* *: fix goleak in the test (pingcap#41339)

close pingcap#41274

* planner: fix tiflash cannot find generated column (pingcap#41261)

close pingcap#40663

* server, execute: set text for execute command (pingcap#41340)

close pingcap#41156

* br: increase the sleep time in the `waitForSend` function (pingcap#41322)

close pingcap#41210

* cgroup: improve test to find cgroup compatibility issues (pingcap#41347)

close pingcap#39786

---------

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: tiancaiamao <tiancaiamao@gmail.com>
Co-authored-by: fzzf678 <108643977+fzzf678@users.noreply.github.com>
Co-authored-by: Yuanjia Zhang <zhangyuanjia@pingcap.com>
Co-authored-by: crazycs <crazycs520@gmail.com>
Co-authored-by: Mattias Jonsson <mjonss@users.noreply.github.com>
Co-authored-by: zzm <zhouzemin@pingcap.com>
Co-authored-by: Song Gao <disxiaofei@163.com>
Co-authored-by: BornChanger <97348524+BornChanger@users.noreply.github.com>
Co-authored-by: Jk Xu <54522439+Dousir9@users.noreply.github.com>
Co-authored-by: Yang Zhang <yang.zhang@pingcap.com>
Co-authored-by: Jianjun Liao <36503113+Leavrth@users.noreply.github.com>
Co-authored-by: lance6716 <lance6716@gmail.com>
Co-authored-by: YangKeao <yangkeao@chunibyo.icu>
Co-authored-by: tangenta <tangenta@126.com>
Co-authored-by: xiongjiwei <xiongjiwei1996@outlook.com>
Co-authored-by: Hangjie Mo <mohangjie1995@gmail.com>
Co-authored-by: you06 <you1474600@gmail.com>
Co-authored-by: djshow832 <zhangming@pingcap.com>
Co-authored-by: Hu# <jinhao.hu@pingcap.com>
Co-authored-by: hongyunyan <649330952@qq.com>
Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: Zak Zhao <57036248+joccau@users.noreply.github.com>
Co-authored-by: Yujie Xia <xiayjchn@gmail.com>
Co-authored-by: Yifan Xu <30385241+xuyifangreeneyes@users.noreply.github.com>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>
Co-authored-by: Lynn <zimu_xia@126.com>
Co-authored-by: Chunzhu Li <lichunzhu@stu.xjtu.edu.cn>
Co-authored-by: dsdashun <dsdashun@qq.com>
Co-authored-by: TonsnakeLin <87681388+TonsnakeLin@users.noreply.github.com>
Co-authored-by: wjHuang <huangwenjun1997@gmail.com>
Co-authored-by: hehechen <chentongli@pingcap.com>
Co-authored-by: Daniël van Eeden <git@myname.nl>
Co-authored-by: MoCuishle28 <32541204+MoCuishle28@users.noreply.github.com>
Co-authored-by: guo-shaoge <shaoge1994@163.com>
Co-authored-by: iosmanthus <MyOsmanthusTree@gmail.com>
Co-authored-by: winkyao <golangwink@gmail.com>
Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn>
Co-authored-by: glorv <glorvs@163.com>
Co-authored-by: Zhenchi <zhongzc_arch@outlook.com>
Co-authored-by: Chengpeng Yan <41809508+Reminiscent@users.noreply.github.com>
Co-authored-by: JmPotato <ghzpotato@gmail.com>
Co-authored-by: Zhigao Tong <tongzhigao@pingcap.com>
Co-authored-by: ystaticy <y_static_y@sina.com>
Co-authored-by: Shenghui Wu <793703860@qq.com>
Co-authored-by: fengou1 <85682690+fengou1@users.noreply.github.com>
Co-authored-by: Chen Ding <dingc05@gmail.com>
Co-authored-by: ghazalfamilyusa <113858565+ghazalfamilyusa@users.noreply.github.com>
Co-authored-by: disksing <i@disksing.com>
Co-authored-by: 山岚 <36239017+YuJuncen@users.noreply.github.com>
Co-authored-by: okJiang <819421878@qq.com>
Co-authored-by: Yongbo Jiang <cabinfeveroier@gmail.com>
Co-authored-by: Lucas <nkcs_lykx@hotmail.com>
Co-authored-by: MyonKeminta <9948422+MyonKeminta@users.noreply.github.com>
Co-authored-by: Yexiang Zhang <mornyx.z@gmail.com>
Co-authored-by: yanweiqi <592838129@qq.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: Zhou Kunqin <25057648+time-and-fate@users.noreply.github.com>
Co-authored-by: Arenatlx <314806019@qq.com>
Co-authored-by: Benjamin2037 <bear.c@pingcap.com>
Co-authored-by: Lars Lehtonen <lars.lehtonen@gmail.com>
Co-authored-by: cfzjywxk <lsswxrxr@163.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
blacktear23 pushed a commit to blacktear23/tidb that referenced this issue Feb 15, 2023
ti-chi-bot bot pushed a commit that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants