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: support create and drop placement policy #27574

Merged
merged 13 commits into from
Aug 30, 2021

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Aug 25, 2021

Signed-off-by: ailinkid 314806019@qq.com

What problem does this PR solve?

Issue Number: part of #26580

What is changed and how it works?

Proposal: placement policy

What's Changed:
Support create placement policy and drop placement policy basically.

What's Remained:
1: create policy and drop policy statement privilege check
2: create policy should have the constraint yaml format check
3: create policy should have the constraint compatibility check
4: drop policy should have the clean the policy dependency in it's usage.
5: drop policy should notify the pd about the db/table/partition's schedule change.

Check List

Tests

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

Release note

ddl: support create and drop placement policy.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 25, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lcwangchao
  • morgo

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 25, 2021
@AilinKid
Copy link
Contributor Author

/run-all-tests

@github-actions github-actions bot added sig/execution SIG execution sig/sql-infra SIG: SQL Infra labels Aug 25, 2021
@AilinKid AilinKid requested review from xhebox and lcwangchao August 25, 2021 08:07
return err
}
// Auto fill the policyID when it is inserted.
policyInfo, err := buildPolicyInfo(stmt)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should do some checks here.

Copy link
Contributor Author

@AilinKid AilinKid Aug 26, 2021

Choose a reason for hiding this comment

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

this work is remained as described above into next pull request. otherwise, this is a too huge pr

ddl/placement_policy.go Outdated Show resolved Hide resolved
ddl/placement_policy_test.go Show resolved Hide resolved
ddl/ddl_api.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2021
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
@AilinKid AilinKid force-pushed the create-drop-placement-policy branch from 922f38d to 2c213c0 Compare August 26, 2021 05:52
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2021
.
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
@AilinKid AilinKid requested review from lcwangchao and mjonss August 27, 2021 02:41
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 27, 2021
@morgo morgo self-requested a review August 30, 2021 03:21
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 30, 2021
@morgo
Copy link
Contributor

morgo commented Aug 30, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 5a3764e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 30, 2021
@ti-chi-bot ti-chi-bot merged commit 8ba11a6 into pingcap:master Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/execution SIG execution sig/sql-infra SIG: SQL Infra size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants