-
Notifications
You must be signed in to change notification settings - Fork 1.2k
restore: update the definition of the parameter --load-stats
and the usage of pitr id map
#20346
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: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Co-authored-by: BornChanger <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
…cn into load_stats_and_pitr_id_map
Signed-off-by: Jianjun Liao <[email protected]>
Signed-off-by: Jianjun Liao <[email protected]>
br/br-checkpoint-restore.md
Outdated
@@ -89,7 +89,11 @@ br 工具暂停 GC 的原理是通过执行 `SET config tikv gc.ratio-threshold | |||
|
|||
在第一次执行恢复并且进入日志恢复阶段时,br 工具会在恢复集群中创建 `__TiDB_BR_Temporary_Log_Restore_Checkpoint` 数据库,用于记录断点数据,以及这次恢复的上游集群 ID 和恢复的时间范围 `start-ts` 与 `restored-ts`。如果在此阶段恢复失败,重新执行恢复命令时,你需要指定与断点记录相同的 `start-ts` 和 `restored-ts` 参数,否则 br 工具会报错,并提示上游集群 ID 或恢复的时间范围与断点记录不同。如果恢复集群已被清理,你可以手动删除 `__TiDB_BR_Temporary_Log_Restore_Checkpoint` 数据库,然后使用其他备份重试。 | |||
|
|||
在第一次执行恢复并且进入日志恢复阶段前,br 工具会构造出在 `restored-ts` 时间点的上下游集群库表 ID 映射关系,并将其持久化到系统表 `mysql.tidb_pitr_id_map` 中,以避免库表 ID 被重复分配。如果删除 `mysql.tidb_pitr_id_map` 中的数据,可能会导致 PITR 恢复数据不一致。 | |||
在第一次执行恢复并且进入日志恢复阶段前,br 工具会构造出在 `restored-ts` 时间点的上下游集群库表 ID 映射关系,并将其持久化到系统表 `mysql.tidb_pitr_id_map` 中,以避免库表 ID 被重复分配。**如果随意删除 `mysql.tidb_pitr_id_map` 中的数据,可能会导致 PITR 恢复数据不一致。** |
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.
- Line 86 写到“PITR 恢复分为快照恢复和日志恢复两个阶段”,下面这三段看起来像分了三个阶段。请看下是否调整该小节开头的描述,或者这三段的逻辑和呈现?
- 另外,从字面语义上看,“在第一次执行恢复并且进入日志恢复阶段前”应该放在“在第一次执行恢复并且进入日志恢复阶段时”前面?
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.
应该说第三段是第二段日志恢复阶段中的前面步骤,这一段相当于一个注意
的提示
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.
好的,我在这段开头加了个“注意” 1cf14ca
Co-authored-by: Lilian Lee <[email protected]>
@BornChanger: adding LGTM is restricted to approvers and reviewers in OWNERS files. In 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?