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: Exchange partition rollback (#45877) #45980

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #45877

What problem does this PR solve?

Issue Number: close #45791, close #45920

Problem Summary:
The first schema change state adds a restriction to the non-partitioned table, so that it can only write (insert/update) rows that would fit into the partition to be exchanged with. But if something fails afterwards, this is never cleared.

What is changed and how it works?

Adding rollback, in case of user cancellation or failure during the DDL execution, after the first state change.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Manual test for upgrade scenario, revert the changes made to ddl/ddl_worker.go (which sets the diff struct) and run the tests manually.

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 mentioned this pull request Aug 10, 2023
12 tasks
@ti-chi-bot ti-chi-bot added 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR. labels Aug 10, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 15, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Aug 17, 2023
@mjonss
Copy link
Contributor

mjonss commented Aug 17, 2023

/retest

@ti-chi-bot ti-chi-bot removed the cherry-pick-approved Cherry pick PR approved by release team. label Aug 18, 2023
@mjonss
Copy link
Contributor

mjonss commented Aug 18, 2023

/retest

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Aug 18, 2023
@ti-chi-bot ti-chi-bot removed the cherry-pick-approved Cherry pick PR approved by release team. label Aug 21, 2023
@ti-chi-bot ti-chi-bot closed this Aug 21, 2023
@YangKeao YangKeao reopened this Sep 8, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjonss, YangKeao

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 11, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Sep 11, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-17 14:01:22.153769861 +0000 UTC m=+812446.702785847: ☑️ agreed by mjonss.
  • 2023-09-11 06:24:53.270801231 +0000 UTC m=+250475.195357627: ☑️ agreed by YangKeao.

@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Sep 11, 2023
@YangKeao YangKeao force-pushed the cherry-pick-45877-to-release-6.5 branch from 4a6c2dd to 4776f61 Compare September 11, 2023 09:13
@YangKeao
Copy link
Member

/retest

@mjonss
Copy link
Contributor

mjonss commented Sep 11, 2023

/retest

@mjonss
Copy link
Contributor

mjonss commented Sep 11, 2023

/run-mysql-test

@mjonss
Copy link
Contributor

mjonss commented Sep 11, 2023

/retest

@YangKeao YangKeao force-pushed the cherry-pick-45877-to-release-6.5 branch 2 times, most recently from 196a085 to 937ccd5 Compare September 11, 2023 13:27
@YangKeao YangKeao requested a review from a team as a code owner September 11, 2023 13:27
@YangKeao YangKeao force-pushed the cherry-pick-45877-to-release-6.5 branch from 937ccd5 to 9251dd2 Compare September 11, 2023 13:42
Signed-off-by: Yang Keao <[email protected]>
@YangKeao YangKeao force-pushed the cherry-pick-45877-to-release-6.5 branch from 9251dd2 to dde2649 Compare September 11, 2023 14:20
@YangKeao
Copy link
Member

/retest

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

❗ No coverage uploaded for pull request base (release-6.5@ae6d59b). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-6.5     #45980   +/-   ##
================================================
  Coverage               ?   73.6591%           
================================================
  Files                  ?       1084           
  Lines                  ?     348322           
  Branches               ?          0           
================================================
  Hits                   ?     256571           
  Misses                 ?      75264           
  Partials               ?      16487           

@ti-chi-bot ti-chi-bot bot merged commit 6bc2e87 into pingcap:release-6.5 Sep 11, 2023
YangKeao pushed a commit to YangKeao/tidb that referenced this pull request Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-6.5 This PR is cherry-picked to release-6.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants