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 table placement option #27799

Merged
merged 7 commits into from
Sep 7, 2021

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Sep 3, 2021

Signed-off-by: ailinkid [email protected]

What problem does this PR solve?

Issue Number: particial close #26581

What is changed and how it works?

1: Support create table with placement options, which could be direct placement options or placement policy.
When both this two exists, placement policy take the priority to take effect in the schedule of PD.

2: Since we move the policyInfo into the parser, so we change the reference source to parser.

Check List

Tests

  • Unit test
  • Integration test

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 3, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lcwangchao
  • xhebox

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-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 3, 2021
@morgo morgo self-requested a review September 6, 2021 02:40
Copy link
Contributor

@xhebox xhebox left a comment

Choose a reason for hiding this comment

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

I just noticed that in the RFC:

You can not use both a placement policy and direct assignment. If you alter specify both in a CREATE TABLE or ALTER TABLE an error will be returned.

Maybe we should not override?

ddl/ddl_api.go Show resolved Hide resolved
ddl/placement_policy_test.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 Sep 6, 2021
@AilinKid AilinKid force-pushed the support-table-placement-opt branch from 0d4c729 to b0df2ee Compare September 6, 2021 09:08
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 6, 2021
Copy link
Contributor

@xhebox xhebox left a comment

Choose a reason for hiding this comment

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

Looks like format is still broken.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 7, 2021
@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 Sep 7, 2021
@AilinKid
Copy link
Contributor Author

AilinKid commented Sep 7, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: d2fc288ce2e8945c1fbfafb485371dfc445dacc1

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 7, 2021
@sylzd
Copy link
Contributor

sylzd commented Sep 7, 2021

/run-check_dev_2

2 similar comments
@sylzd
Copy link
Contributor

sylzd commented Sep 7, 2021

/run-check_dev_2

@sylzd
Copy link
Contributor

sylzd commented Sep 7, 2021

/run-check_dev_2

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 7, 2021
Signed-off-by: ailinkid <[email protected]>
Signed-off-by: ailinkid <[email protected]>
Signed-off-by: ailinkid <[email protected]>
Signed-off-by: ailinkid <[email protected]>
Signed-off-by: ailinkid <[email protected]>
@AilinKid AilinKid force-pushed the support-table-placement-opt branch from a32c9b3 to c6b5550 Compare September 7, 2021 14:07
@ti-chi-bot ti-chi-bot removed status/can-merge Indicates a PR has been approved by a committer. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 7, 2021
@AilinKid
Copy link
Contributor Author

AilinKid commented Sep 7, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: b4a7c08

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 7, 2021
@AilinKid
Copy link
Contributor Author

AilinKid commented Sep 7, 2021

/run-check_dev_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. 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.

Support direct placement as table_options
5 participants