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 placement policy in alter table partition by #48631

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

mjonss
Copy link
Contributor

@mjonss mjonss commented Nov 15, 2023

What problem does this PR solve?

Issue Number: close #48630

Problem Summary:
When specifying PLACEMENT POLICY per partitions in ALTER TABLE t PARTITION BY ... it failed, due to missed lookup of Name -> ID of the placement policy.
Workaround is to not assign placement policy and then alter the placement policy by:
https://docs.pingcap.com/tidb/dev/placement-rules-in-sql#specify-a-placement-policy-for-a-partitioned-table

What is changed and how it works?

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/invalid-title do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 15, 2023
Copy link

tiprow bot commented Nov 15, 2023

Hi @mjonss. 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.

@mjonss mjonss changed the title Fix placement policy in alter table partition by ddl: Fix placement policy in alter table partition by Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Merging #48631 (bddbcec) into master (625dc4e) will increase coverage by 2.7953%.
Report is 54 commits behind head on master.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48631        +/-   ##
================================================
+ Coverage   71.4230%   74.2184%   +2.7953%     
================================================
  Files          1404       1436        +32     
  Lines        407220     428310     +21090     
================================================
+ Hits         290849     317885     +27036     
+ Misses        96417      91601      -4816     
+ Partials      19954      18824      -1130     
Flag Coverage Δ
integration 45.5125% <0.0000%> (?)
unit 72.5788% <0.0000%> (+1.1557%) ⬆️

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

Components Coverage Δ
dumpling 54.1220% <ø> (+0.1345%) ⬆️
parser ∅ <ø> (∅)
br 48.9444% <ø> (-4.1373%) ⬇️

@mjonss
Copy link
Contributor Author

mjonss commented Nov 16, 2023

/retest

Copy link

tiprow bot commented Nov 16, 2023

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

@mjonss
Copy link
Contributor Author

mjonss commented Nov 16, 2023

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Nov 16, 2023
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 17, 2023
Copy link
Member

@YangKeao YangKeao 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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 17, 2023
Copy link

ti-chi-bot bot commented Nov 17, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-17 08:26:39.952219044 +0000 UTC m=+4410397.539329174: ☑️ agreed by lcwangchao.
  • 2023-11-17 08:41:54.506607536 +0000 UTC m=+4411312.093717666: ☑️ agreed by YangKeao.

@YangKeao
Copy link
Member

@mjonss Please triage the issue 🍻

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. and removed do-not-merge/needs-triage-completed labels Nov 21, 2023
Copy link

ti-chi-bot bot commented Nov 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcwangchao, YangKeao, 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

@ti-chi-bot ti-chi-bot bot added the approved label Nov 21, 2023
@ti-chi-bot ti-chi-bot bot merged commit 058a961 into pingcap:master Nov 21, 2023
13 of 16 checks passed
@ti-chi-bot
Copy link
Member

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

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ALTER TABLE t PARTITION BY gives error when specifying PLACEMENT POLICY
5 participants