-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pd,tidb: support affinity schedule #21207
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: lhy1024 <admin@liudos.us>
|
@lcwangchao: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: 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-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: lhy1024 <admin@liudos.us>
table-affinity.md
Outdated
|
|
||
| - 非分区表:`AFFINITY='table'`。 | ||
| - 分区表:`AFFINITY='partition'`,每个分区会生成独立的亲和性分组。 | ||
| - 取消亲和性:设置为 `AFFINITY=''` 或 `AFFINITY='none'`。 |
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.
当表从affinity='table' or 'partition' 修改为 'none' 后,会立即出发pd的重新调度(包括分裂)吗,什么时候触发执行,这个要说明下
table-affinity.md
Outdated
| ## 支持的亲和性级别 | ||
|
|
||
| - 非分区表:`AFFINITY='table'`。 | ||
| - 分区表:`AFFINITY='partition'`,每个分区会生成独立的亲和性分组。 |
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.
文字最后补充说明:如若表有4个分区,则会分别针对每个分区生成亲和性分组,故总共有4个独立的亲和性分组。
|
|
||
| - `LEADER_STORE_ID`、`VOTER_STORE_IDS`:PD 为该表或分区记录的目标 Leader 副本和 Voter 副本所在的 store ID。当亲和性尚未确定时显示为 `NULL`。 | ||
| - `STATUS`:`Pending` 表示 PD 尚未进行亲和性调度,`Preparing` 表示正在调度 Region 以满足亲和性要求,`Stable` 表示所有 Region 已经达到目标分布。 | ||
| - `REGION_COUNT`:当前在该亲和性组中的 Region 数量。 |
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.
Region_count 和 Affinity_region_count 的含义没有说明清楚,我的理解是不是如下:
- 若 region_count > Affinity_region_count 时,表示pd调度没有完成;
- 若 region_count = Affinity_region_count 时,表示pd调度工作完成;
- 若 region_count < Affinity_region_count 时,表示pd调度工作完成,同时已经开始执行merge操作,但无法说明merge是否完成,是否完成需要手工根据max-affinity-merge-region-size和普通region(某参数)计算出来
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.
【若 region_count < Affinity_region_count 时】不存在这种状态;若 region_count = Affinity_region_count 时,且两者同步减少,说明正在 merge
zhaoshangzi
left a comment
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.
以下2个文件需要修改
sql-statements/sql-statement-show-affinity.md
table-affinity.md
|
@zhaoshangzi: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this:
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-sigs/prow repository. |
Signed-off-by: lhy1024 <admin@liudos.us>
|
@lhy1024: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
@zhaoshangzi: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: 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-sigs/prow repository. |
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?