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

*: supports setting global/meta range placement policy #47561

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

nolouch
Copy link
Member

@nolouch nolouch commented Oct 11, 2023

What problem does this PR solve?

Issue Number: close #29677 ref #45384

Problem Summary:

What is changed and how it works?

unify the entry of placement rule to tidb. supports setting global/meta range placement policy by tidb. Example:

// policy about 5 replicas
create placement policy `mypolicy` FOLLOWERS=4;

// set global range to 5 replicas
ALTER RANGE global PLACEMENT POLICY mypolicy
// set meta range to 5 replicas
ALTER RANGE meta PLACEMENT POLICY mypolicy
// remove and reset to default
ALTER RANGE global PLACEMENT POLICY default

Check List

Tests

  • Unit test
  • Integration test
  • Manual test

step 1:

image
image

step 2

image
image

Step 3

image

Step 4

image

Documentation

  • Affects user behaviors

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

*: supports setting global/meta range placement policy

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 11, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 11, 2023
@tiprow
Copy link

tiprow bot commented Oct 11, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@nolouch nolouch force-pushed the supports-config-system-policy branch from f65893f to 07bc3a0 Compare October 11, 2023 16:38
@nolouch nolouch marked this pull request as ready for review October 11, 2023 17:57
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 11, 2023
@nolouch nolouch force-pushed the supports-config-system-policy branch 3 times, most recently from 1ddb359 to 9516c17 Compare October 11, 2023 18:17
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch nolouch force-pushed the supports-config-system-policy branch from 9516c17 to 3a2c605 Compare October 11, 2023 18:19
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #47561 (fbff1b0) into master (97c7741) will increase coverage by 0.7422%.
Report is 40 commits behind head on master.
The diff coverage is 55.0724%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #47561        +/-   ##
================================================
+ Coverage   72.1482%   72.8904%   +0.7422%     
================================================
  Files          1353       1375        +22     
  Lines        401307     408587      +7280     
================================================
+ Hits         289536     297821      +8285     
+ Misses        92469      91991       -478     
+ Partials      19302      18775       -527     
Flag Coverage Δ
integration 40.8122% <8.1300%> (?)
unit 72.0507% <53.6231%> (-0.0976%) ⬇️

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

Components Coverage Δ
dumpling 53.9913% <ø> (ø)
parser 84.7222% <60.0000%> (+0.0253%) ⬆️
br 48.9944% <ø> (-4.2010%) ⬇️

@nolouch
Copy link
Member Author

nolouch commented Oct 12, 2023

/retest-required

executor/simple.go Outdated Show resolved Hide resolved
ddl/placement_policy.go Outdated Show resolved Hide resolved
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch
Copy link
Member Author

nolouch commented Oct 12, 2023

/retest-required

@nolouch
Copy link
Member Author

nolouch commented Oct 12, 2023

/retest-require

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 12, 2023
@nolouch
Copy link
Member Author

nolouch commented Oct 12, 2023

/retest-require

@nolouch
Copy link
Member Author

nolouch commented Oct 13, 2023

ptal @xhebox @lcwangchao

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 13, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 13, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-12 13:45:36.84813375 +0000 UTC m=+1319134.435243897: ☑️ agreed by CabinfeverB.
  • 2023-10-13 04:10:40.721096619 +0000 UTC m=+1371038.308206758: ☑️ agreed by xhebox.

@nolouch
Copy link
Member Author

nolouch commented Oct 13, 2023

/retest-required

@easonn7
Copy link

easonn7 commented Oct 13, 2023

/approve

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CabinfeverB, easonn7, xhebox

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 Oct 13, 2023
@nolouch
Copy link
Member Author

nolouch commented Oct 13, 2023

/retest-required

@nolouch nolouch self-assigned this Oct 13, 2023
@nolouch
Copy link
Member Author

nolouch commented Oct 13, 2023

/retest-required

@ti-chi-bot ti-chi-bot bot merged commit 9a52c71 into pingcap:master Oct 13, 2023
@nolouch nolouch deleted the supports-config-system-policy branch October 13, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

Add Support for "Built In Placement Policies"
4 participants