Repository navigation
docs: clarify the snapshot time for sync-diff-inspector - #21996
dzhmj0204-creator wants to merge 3 commits into
Conversation
The BackupTS returned by RESTORE is the backup snapshot time that the restore is based on, not the time when the restore completes. Using it as the downstream snapshot can make sync-diff-inspector report that the table does not exist. Clarify what the downstream snapshot should be. Ref pingcap#21575 Signed-off-by: dzhmj0204-creator <306411393+dzhmj0204-creator@users.noreply.github.com>
|
[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 |
|
Hi @dzhmj0204-creator. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
Welcome @dzhmj0204-creator! |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: pingcap/docs-cn
- Branch: master
- File: .coderabbit.yaml
- Commit: 9f0e45f
- Layers: Repository YAML
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
ec0ef122-9c67-4bc8-9896-0d5cfe6c101a
📒 Files selected for processing: 1
replicate-between-primary-and-secondary-clusters.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
Replace the concrete BackupTS value returned by RESTORE with an empty value so that readers do not copy a backup snapshot time into the downstream snapshot setting, which can cause sync-diff-inspector to report that the table does not exist. Address the review comment on pingcap#21996. Signed-off-by: dzhmj0204-creator <306411393+dzhmj0204-creator@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Source mode: Auto
- Repository: pingcap/docs-cn
- Branch: master
- File: .coderabbit.yaml
- Commit: 9f0e45f
- Layers: Repository YAML
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
f563f3cb-8cd4-4a53-81d0-bd07ff6e47e3
📒 Files selected for processing: 1
replicate-between-primary-and-secondary-clusters.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The NOW()-based expression only has second precision, so the TSO derived from it can be earlier than the restore completion time when the restore finishes within the same second. Use TIDB_CURRENT_TSO(), which returns a real TSO and is already documented in functions-and-operators/tidb-functions.md. Signed-off-by: dzhmj0204-creator <306411393+dzhmj0204-creator@users.noreply.github.com>
|
One more follow-up on the second suggestion in this thread: you are right that I have replaced the expression with |
First-time contributors' checklist
What is changed, added, or deleted? (Required)
In
replicate-between-primary-and-secondary-clusters.md, the doc states that theBackupTSreturned byRESTOREis "the time when the downstream cluster finishes restoring data". This is inaccurate: that value is the backup snapshot time on which the restore is based.Using it as the
snapshotof the downstream data source can make sync-diff-inspector report that the table does not exist. This PR clarifies the paragraph and the comment of the downstreamsnapshotconfig, and points out that the downstreamsnapshotshould be a time point after the restore completes.Close #21575
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
AI agent involvement
Summary by CodeRabbit
BackupTS表示恢复所依据的备份快照时间点,不代表恢复完成时间。snapshot应设置为恢复完成后的时间点;配置示例改为空值,并补充在 RESTORE 完成后通过SELECT TIDB_CURRENT_TSO();获取当前 TSO 的方法。