pingcap / pingcap/docs-cn

关于校验数据部分的问题

Open Beginner friendly
#21,575 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contribution first-time-contributor
Dominant language
Python
Stars
1.8k
Forks
1.2k
Avg merge
1d 16h
Merged PRs (30d)
31

Description

File: /release-8.5/replicate-between-primary-and-secondary-clusters.md

原文档 :

(可选)校验数据。

通过 sync-diff-inspector 工具,可以验证上下游数据在某个时间点的一致性。从上述备份和恢复命令的输出可以看到,上游集群备份的时间点为 431434047157698561,下游集群完成数据恢复的时间点为 431434141450371074。

问题描述:

在多次测试中发现,如果”下游集群完成数据恢复的时间点“,选择restore完成后系统返回那个clusterTs, 大概率是要报”表不存在“的错误。
如果下游集群无其它变更操作,可使用过clusterTs+N秒的Tso,或者就是当前时刻。

[data-sources.downstream]
host = " " # 替换为实际下游集群 ip
port = 4000
user = "root"
password = ""
snapshot = "431434141450371074" # 推荐配置为当前时刻TSO, SELECT (UNIX_TIMESTAMP(now()) * 1000) << 18 AS tso;

原文中的命令:sync_diff_inspector -C ./config.yaml
应改为: tiup sync-diff-inspector -C ./config.yaml

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open release-8.5/replicate-between-primary-and-secondary-clusters.md and review the data-validation section and its sync-diff-inspector link. Update the snapshot guidance to reflect the reported restore timing issue, and change the example command to use tiup sync-diff-inspector; the documentation is done when these corrections are clear in the rendered page.

Written by the indexing model from the issue text.

Assessment

Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.