-
Notifications
You must be signed in to change notification settings - Fork 678
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
how-to: add placement rule guide #2171
Conversation
how-to/configure/placement-rules.md
Outdated
|
||
# Placement Rules | ||
|
||
Placement Rules is an experimental feature introduced since PD v4.0. It is a replica rule system that guides PD to generate corresponding schedules for different types of data. By combining different scheduling rules, you can finely control the attributes such as the number of replicas of any continuous data range, the storage location, the host type, whether to participate in Raft election, and whether to act as the Raft leader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storage location, host type, 后面这些跟 number of replicas 是并列关系的,都是一种 attribute。这么改行不行?
Placement Rules is an experimental feature introduced since PD v4.0. It is a replica rule system that guides PD to generate corresponding schedules for different types of data. By combining different scheduling rules, you can finely control the attributes such as the number of replicas of any continuous data range, the storage location, the host type, whether to participate in Raft election, and whether to act as the Raft leader. | |
Placement Rules is an experimental feature introduced since PD v4.0. It is a replica rule system that guides PD to generate corresponding schedules for different types of data. By combining different scheduling rules, you can finely control the attributes of any continuous data range, such as the number of replicas, the storage location, the host type, whether to participate in Raft election, and whether to act as the Raft leader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,已改。
how-to/configure/placement-rules.md
Outdated
| `GroupID` | `string` | The group ID that marks the source of the rule. | | ||
| `ID` | `string` | The unique ID of a rule in a group. | | ||
| `Index` | `int` | The stacking sequence of rules in a group. | | ||
| `Override` | `true`/`false` | The smaller rule that determines whether to overwrite index (in a group). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether to overwrite rule with smaller index (in a group)
how-to/configure/placement-rules.md
Outdated
enable-placement-rules = true | ||
``` | ||
|
||
In this way, PD enables this feature after the cluster is successfully initialized and generates corresponding rules according to the `max-replicas` and `location-labels` configurations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initialized -> bootstrapped
how-to/configure/placement-rules.md
Outdated
} | ||
``` | ||
|
||
For a initialized cluster, you can also enable Placement Rules online through pd-ctl: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bootstrapped cluster
how-to/configure/placement-rules.md
Outdated
} | ||
``` | ||
|
||
### Place five replicas in three data centers in the proportion of two-two-one, and the Leader should not be in the third data center |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two-two-one -> 2-2-1 or 2:2:1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* how-to: add placement rule guide * fix typos * address comments from disksing * how-to: update wording and format * how-to: update and fix description Co-authored-by: Lilian Lee <lilin@pingcap.com>
cherry pick to release-4.0 in PR #2185 |
* how-to: add placement rule guide * fix typos * address comments from disksing * how-to: update wording and format * how-to: update and fix description Co-authored-by: Lilian Lee <lilin@pingcap.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> Co-authored-by: Lilian Lee <lilin@pingcap.com>
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #2810 |
What is changed, added or deleted? (Required)
Add placement rules configuratoin guide.
Which TiDB version(s) do your changes apply to? (Required)
If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-4.0, needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.
What is the related PR or file link(s)?