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

ddl: refactor job args for alter sequence/auto-id-cache/shard-rowid/cache/ttl related ddl job. #56206

Merged
merged 16 commits into from
Sep 25, 2024

Conversation

joccau
Copy link
Member

@joccau joccau commented Sep 22, 2024

What problem does this PR solve?

Issue Number: Ref #53930
Ref #54436

Problem Summary:

What changed and how does it work?

Refactor the job args for follow ddl types:

  • ActionAlterSequence
  • ActionModifyTableAutoIDCache
  • ActionShardRowID
  • ActionAlterCacheTable
  • ActionAlterNoCacheTable
  • ActionAlterTTLInfo
  • ActionAlterTTLRemove

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Sep 22, 2024
Copy link

codecov bot commented Sep 22, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 15 lines in your changes missing coverage. Please review.

Project coverage is 76.0641%. Comparing base (bf455f5) to head (b9410a9).
Report is 3 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56206        +/-   ##
================================================
+ Coverage   73.4156%   76.0641%   +2.6484%     
================================================
  Files          1605       1627        +22     
  Lines        445006     453332      +8326     
================================================
+ Hits         326704     344823     +18119     
+ Misses        98251      87056     -11195     
- Partials      20051      21453      +1402     
Flag Coverage Δ
integration 51.7130% <53.3333%> (?)
unit 72.5196% <78.0952%> (+0.0118%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.0335% <ø> (+17.0025%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 22, 2024
@joccau joccau changed the title ddl: refactor job args for alter sequence ddl ddl: refactor job args for AlterSequence/ModifyTableAutoIDCache Sep 22, 2024
@joccau
Copy link
Member Author

joccau commented Sep 22, 2024

/retest

@joccau joccau changed the title ddl: refactor job args for AlterSequence/ModifyTableAutoIDCache ddl: refactor job args for AlterSequence/ModifyTableAutoIDCache/ShardRowID Sep 22, 2024
@joccau
Copy link
Member Author

joccau commented Sep 23, 2024

/test unit-test

Copy link

tiprow bot commented Sep 23, 2024

@joccau: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test unit-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@joccau joccau changed the title ddl: refactor job args for AlterSequence/ModifyTableAutoIDCache/ShardRowID ddl: refactor job args for AlterSequence/ModifyTableAutoIDCache/ShardRowID/AlterCacheTable Sep 23, 2024
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 23, 2024
@D3Hunter D3Hunter mentioned this pull request Sep 23, 2024
54 tasks
@joccau joccau changed the title ddl: refactor job args for AlterSequence/ModifyTableAutoIDCache/ShardRowID/AlterCacheTable ddl: refactor job args for alter-ttl-info, alter-ttl-remove related ddl job. Sep 24, 2024
Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest lgtm

pkg/meta/model/job_args.go Outdated Show resolved Hide resolved
pkg/ddl/executor.go Outdated Show resolved Hide resolved
@D3Hunter D3Hunter changed the title ddl: refactor job args for alter-ttl-info, alter-ttl-remove related ddl job. ddl: refactor job args for alter sequence/auto-id-cache/shard-rowid/cache/ttl related ddl job. Sep 24, 2024
pkg/ddl/executor.go Outdated Show resolved Hide resolved
pkg/meta/model/job_args.go Outdated Show resolved Hide resolved
pkg/ddl/table_test.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 24, 2024
Signed-off-by: joccau <[email protected]>
Signed-off-by: joccau <[email protected]>
@D3Hunter
Copy link
Contributor

D3Hunter commented Sep 24, 2024

/hold

TestIndexMergePanic failed, the panic is expected, but it timed out

[2024/09/24 08:33:36.091 +00:00] [ERROR] [misc.go:93] ["panic in the recoverable goroutine"] [r="failpoint panic: github.com/pingcap/tidb/pkg/executor/testIndexMergePanicPartialIndexWorker"] ["stack trace"="github.com/pingcap/tidb/pkg/util.WithRecovery.func1\n\tpkg/util/misc.go:95\nruntime.gopanic\n\tGOROOT/src/runtime/panic.go:920\ngithub.com/pingcap/failpoint.actPanic\n\texternal/com_github_pingcap_failpoint/terms.go:344\ngithub.com/pingcap/failpoint.(*term).do\n\texternal/com_github_pingcap_failpoint/terms.go:311\ngithub.com/pingcap/failpoint.(*terms).eval\n\texternal/com_github_pingcap_failpoint/terms.go:116\ngithub.com/pingcap/failpoint.(*Failpoint).Eval\n\texternal/com_github_pingcap_failpoint/failpoint.go:129\ngithub.com/pingcap/failpoint.(*Failpoints).Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:231\ngithub.com/pingcap/failpoint.Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:311\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1.1\n\tpkg/executor/index_merge_reader.go:362\ngithub.com/pingcap/tidb/pkg/util.WithRecovery\n\tpkg/util/misc.go:98\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1\n\tpkg/executor/index_merge_reader.go:360"] [stack="github.com/pingcap/tidb/pkg/util.WithRecovery.func1\n\tpkg/util/misc.go:93\nruntime.gopanic\n\tGOROOT/src/runtime/panic.go:920\ngithub.com/pingcap/failpoint.actPanic\n\texternal/com_github_pingcap_failpoint/terms.go:344\ngithub.com/pingcap/failpoint.(*term).do\n\texternal/com_github_pingcap_failpoint/terms.go:311\ngithub.com/pingcap/failpoint.(*terms).eval\n\texternal/com_github_pingcap_failpoint/terms.go:116\ngithub.com/pingcap/failpoint.(*Failpoint).Eval\n\texternal/com_github_pingcap_failpoint/failpoint.go:129\ngithub.com/pingcap/failpoint.(*Failpoints).Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:231\ngithub.com/pingcap/failpoint.Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:311\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1.1\n\tpkg/executor/index_merge_reader.go:362\ngithub.com/pingcap/tidb/pkg/util.WithRecovery\n\tpkg/util/misc.go:98\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1\n\tpkg/executor/index_merge_reader.go:360"]

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 24, 2024
@D3Hunter
Copy link
Contributor

/unhold

seems not related to this pr

/hold

TestIndexMergePanic failed, the panic is expected, but it timed out

[2024/09/24 08:33:36.091 +00:00] [ERROR] [misc.go:93] ["panic in the recoverable goroutine"] [r="failpoint panic: github.com/pingcap/tidb/pkg/executor/testIndexMergePanicPartialIndexWorker"] ["stack trace"="github.com/pingcap/tidb/pkg/util.WithRecovery.func1\n\tpkg/util/misc.go:95\nruntime.gopanic\n\tGOROOT/src/runtime/panic.go:920\ngithub.com/pingcap/failpoint.actPanic\n\texternal/com_github_pingcap_failpoint/terms.go:344\ngithub.com/pingcap/failpoint.(*term).do\n\texternal/com_github_pingcap_failpoint/terms.go:311\ngithub.com/pingcap/failpoint.(*terms).eval\n\texternal/com_github_pingcap_failpoint/terms.go:116\ngithub.com/pingcap/failpoint.(*Failpoint).Eval\n\texternal/com_github_pingcap_failpoint/failpoint.go:129\ngithub.com/pingcap/failpoint.(*Failpoints).Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:231\ngithub.com/pingcap/failpoint.Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:311\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1.1\n\tpkg/executor/index_merge_reader.go:362\ngithub.com/pingcap/tidb/pkg/util.WithRecovery\n\tpkg/util/misc.go:98\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1\n\tpkg/executor/index_merge_reader.go:360"] [stack="github.com/pingcap/tidb/pkg/util.WithRecovery.func1\n\tpkg/util/misc.go:93\nruntime.gopanic\n\tGOROOT/src/runtime/panic.go:920\ngithub.com/pingcap/failpoint.actPanic\n\texternal/com_github_pingcap_failpoint/terms.go:344\ngithub.com/pingcap/failpoint.(*term).do\n\texternal/com_github_pingcap_failpoint/terms.go:311\ngithub.com/pingcap/failpoint.(*terms).eval\n\texternal/com_github_pingcap_failpoint/terms.go:116\ngithub.com/pingcap/failpoint.(*Failpoint).Eval\n\texternal/com_github_pingcap_failpoint/failpoint.go:129\ngithub.com/pingcap/failpoint.(*Failpoints).Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:231\ngithub.com/pingcap/failpoint.Eval\n\texternal/com_github_pingcap_failpoint/failpoints.go:311\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1.1\n\tpkg/executor/index_merge_reader.go:362\ngithub.com/pingcap/tidb/pkg/util.WithRecovery\n\tpkg/util/misc.go:98\ngithub.com/pingcap/tidb/pkg/executor.(*IndexMergeReaderExecutor).startPartialIndexWorker.func1\n\tpkg/executor/index_merge_reader.go:360"]

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2024
Copy link

ti-chi-bot bot commented Sep 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: D3Hunter, tangenta

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 25, 2024
Copy link

ti-chi-bot bot commented Sep 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-24 07:08:37.185501752 +0000 UTC m=+1549786.925925686: ☑️ agreed by D3Hunter.
  • 2024-09-25 09:08:59.667468295 +0000 UTC m=+1643409.407892231: ☑️ agreed by tangenta.

@ti-chi-bot ti-chi-bot bot merged commit a159c49 into pingcap:master Sep 25, 2024
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants