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: fix rollback reorganize partition left intermediate state #51631

Merged
merged 14 commits into from
Mar 29, 2024

Conversation

jiyfhust
Copy link
Contributor

@jiyfhust jiyfhust commented Mar 10, 2024

What problem does this PR solve?

Issue Number: close #51090

Problem Summary:

What changed and how does it work?

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-triage-completed 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 Mar 10, 2024
@jiyfhust
Copy link
Contributor Author

/ok-to-test

Copy link

tiprow bot commented Mar 10, 2024

Hi @jiyfhust. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Mar 10, 2024
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Merging #51631 (992eaa9) into master (1549ea6) will decrease coverage by 15.9691%.
Report is 30 commits behind head on master.
The diff coverage is 88.8888%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #51631         +/-   ##
=================================================
- Coverage   70.7412%   54.7721%   -15.9691%     
=================================================
  Files          1486       1605        +119     
  Lines        439485     613516     +174031     
=================================================
+ Hits         310897     336036      +25139     
- Misses       109161     254277     +145116     
- Partials      19427      23203       +3776     
Flag Coverage Δ
integration 37.1116% <44.4444%> (?)
unit 70.4383% <88.8888%> (-0.1202%) ⬇️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.5480% <ø> (+5.7055%) ⬆️

@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 Mar 10, 2024
@jiyfhust
Copy link
Contributor Author

/test mysql-test

Copy link

tiprow bot commented Mar 10, 2024

@jiyfhust: 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 mysql-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/test-infra repository.

@jiyfhust
Copy link
Contributor Author

/test mysql-test

Copy link

tiprow bot commented Mar 10, 2024

@jiyfhust: 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 mysql-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/test-infra repository.

@jiyfhust
Copy link
Contributor Author

/cc @tangenta @mjonss @tiancaiamao

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 12, 2024
@ti-chi-bot ti-chi-bot bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 12, 2024
@ti-chi-bot ti-chi-bot bot requested a review from zimulala March 20, 2024 01:11
@@ -1319,6 +1319,14 @@ func (pi *PartitionInfo) HasTruncatingPartitionID(pid int64) bool {
return false
}

// ClearReorgIntermediateInfo remove intermediate information used during reorganize partition.
func (pi *PartitionInfo) ClearReorgIntermediateInfo() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a simple UT to model_test.go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test is added. 34b8c3a

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

ti-chi-bot bot commented Mar 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-12 13:23:28.466734005 +0000 UTC m=+778235.488980393: ☑️ agreed by mjonss.
  • 2024-03-20 03:58:45.364959035 +0000 UTC m=+1435552.387205424: ☑️ agreed by zimulala.

@zimulala
Copy link
Contributor

PTAL @tangenta

@jiyfhust
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented Mar 20, 2024

@jiyfhust: 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/test-infra repository.

@jiyfhust
Copy link
Contributor Author

PTAL @tangenta

@jiyfhust
Copy link
Contributor Author

sig-approvers-parser: # approvers for parser module.
- bb7133
- BornChanger
- D3Hunter
- tangenta

/cc bb7133 BornChanger D3Hunter tangenta

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added the approved label Mar 29, 2024
Copy link

ti-chi-bot bot commented Mar 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, D3Hunter, mjonss, zimulala

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

@jiyfhust
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented Mar 29, 2024

@jiyfhust: 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/test-infra repository.

@ti-chi-bot ti-chi-bot bot merged commit 0e9e712 into pingcap:master Mar 29, 2024
22 of 23 checks passed
@jiyfhust jiyfhust deleted the fix_rollback_reorganize branch March 29, 2024 07:52
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label May 22, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #53469.

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 22, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ALTER TABLE t PARTITION BY KEY(a) leaves the table in an intermediate state if DDL is cancelled
6 participants