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: Reorganize Partition failure/rollback tests and fixes #53544

Merged
merged 66 commits into from
Sep 26, 2024

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented May 24, 2024

What problem does this PR solve?

Issue Number: ref #45133

Problem Summary:
Added tests, with failpoints for onReorganizePartition and fixes for found issues.
Follow up of #53277

Will see how to backport tests and fixes

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

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.

most part lgtm, but I am not familiar with partitioned table, can you find another reviewer for it. I will approve for ddl/meta pkgs

NewPartitionIDs []int64 `json:"new_partition_ids,omitempty"`
// OriginalPartitionIDsOrder is only needed for rollback of Reorganize Partition for
// LIST partitions, since in StateDeleteReorganize we don't know the old order any longer.
OriginalPartitionIDsOrder []int64 `json:"original_partition_ids_order,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was not aware of this work, but that is a very good improvement and suggestion!
OriginalPartitionIDsOrder is only used for rollback and can be in the job struct instead!

@D3Hunter How do we make it happen, should I change it in this PR, wait for #56163 or create a follow up PR when both are merged?

Copy link
Contributor

Choose a reason for hiding this comment

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

#56163 merged. both ways lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will make a follow up PR to move the OriginalPartitionIDsOrder to the job.Args v2 struct, with the new type handling.

pkg/ddl/tests/partition/reorg_partition_test.go Outdated Show resolved Hide resolved
pkg/ddl/tests/partition/reorg_partition_test.go Outdated Show resolved Hide resolved
@D3Hunter
Copy link
Contributor

/approve

for ddl/meta pkg

@ti-chi-bot ti-chi-bot bot added the approved label Sep 20, 2024
@purelind
Copy link
Contributor

/retest

Copy link

tiprow bot commented Sep 21, 2024

@purelind: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

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

Copy link

ti-chi-bot bot commented Sep 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 26, 2024
Copy link

ti-chi-bot bot commented Sep 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-14 07:55:41.338078778 +0000 UTC m=+710495.391390699: ☑️ agreed by Defined2014.
  • 2024-09-26 05:50:54.07107839 +0000 UTC m=+1717923.811502329: ☑️ agreed by bb7133.

@mjonss mjonss removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2024
@mjonss
Copy link
Contributor Author

mjonss commented Sep 26, 2024

/retest

Copy link

tiprow bot commented Sep 26, 2024

@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@mjonss
Copy link
Contributor Author

mjonss commented Sep 26, 2024

/retest

Copy link

tiprow bot commented Sep 26, 2024

@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@mjonss
Copy link
Contributor Author

mjonss commented Sep 26, 2024

/retest

Copy link

tiprow bot commented Sep 26, 2024

@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@mjonss
Copy link
Contributor Author

mjonss commented Sep 26, 2024

/retest

Copy link

tiprow bot commented Sep 26, 2024

@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@mjonss
Copy link
Contributor Author

mjonss commented Sep 26, 2024

/retest

Copy link

tiprow bot commented Sep 26, 2024

@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot merged commit f2ed822 into pingcap:master Sep 26, 2024
23 checks passed
@mjonss mjonss deleted the part-reorg-rollback-tests branch September 27, 2024 07:02
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants