-
Notifications
You must be signed in to change notification settings - Fork 708
docs: update sync-diff-inspector docs for move to tiflow repo #20140
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
Merged
ti-chi-bot
merged 9 commits into
pingcap:master
from
alastori:update-sync-diff-inspector-repo
Mar 27, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8317102
docs: update sync-diff-inspector docs for move to tiflow repo
alastori e6c4ca4
style: fix markdown linting errors in sync-diff-inspector docs
alastori 8032c47
Update sync-diff-inspector-overview.md
alastori 8fc3451
revise wording and remove copyable
Oreoxmt f02252d
add GitHub link
Oreoxmt b288bc9
Update download-ecosystem-tools.md
alastori 7d7687d
Update sync-diff-inspector/sync-diff-inspector-overview.md
alastori 2cb952b
Move Key features section before Install section
alastori c8580cb
Update sync-diff-inspector/sync-diff-inspector-overview.md
alastori File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,18 +6,9 @@ aliases: ['/docs/dev/sync-diff-inspector/sync-diff-inspector-overview/','/docs/d | |
|
|
||
| # sync-diff-inspector User Guide | ||
|
|
||
| [sync-diff-inspector](https://github.com/pingcap/tidb-tools/tree/master/sync_diff_inspector) is a tool used to compare data stored in the databases with the MySQL protocol. For example, it can compare the data in MySQL with that in TiDB, the data in MySQL with that in MySQL, or the data in TiDB with that in TiDB. In addition, you can also use this tool to repair data in the scenario where a small amount of data is inconsistent. | ||
| [sync-diff-inspector](https://github.com/pingcap/tiflow/tree/master/sync_diff_inspector) is a tool used to compare data stored in the databases with the MySQL protocol. For example, it can compare the data in MySQL with that in TiDB, the data in MySQL with that in MySQL, or the data in TiDB with that in TiDB. In addition, you can also use this tool to repair data in the scenario where a small amount of data is inconsistent. | ||
|
|
||
| This guide introduces the key features of sync-diff-inspector and describes how to configure and use this tool. To download sync-diff-inspector, use one of the following methods: | ||
|
|
||
| + Binary package. The sync-diff-inspector binary package is included in the TiDB Toolkit. To download the TiDB Toolkit, see [Download TiDB Tools](/download-ecosystem-tools.md). | ||
| + Docker image. Execute the following command to download: | ||
|
|
||
| {{< copyable "shell-regular" >}} | ||
|
|
||
| ```shell | ||
| docker pull pingcap/tidb-tools:latest | ||
| ``` | ||
| This guide introduces the key features of sync-diff-inspector and describes how to configure and use this tool. | ||
|
|
||
| ## Key features | ||
|
|
||
|
|
@@ -28,6 +19,36 @@ This guide introduces the key features of sync-diff-inspector and describes how | |
| * Support [data check for TiDB upstream-downstream clusters](/ticdc/ticdc-upstream-downstream-check.md) | ||
| * Support [data check in the DM replication scenario](/sync-diff-inspector/dm-diff.md) | ||
|
|
||
| ## Install sync-diff-inspector | ||
|
|
||
| The installation method varies depending on your TiDB version: | ||
|
|
||
| For TiDB v9.0.0 and later versions: | ||
|
|
||
| + Install using TiUP: | ||
|
|
||
| ```shell | ||
| tiup install sync-diff-inspector | ||
| ``` | ||
|
|
||
| + Binary package. The sync-diff-inspector binary package is included in the TiDB Toolkit. To download the TiDB Toolkit, see [Download TiDB Tools](/download-ecosystem-tools.md). | ||
|
|
||
| + Docker image. Execute the following command to download: | ||
|
|
||
| ```shell | ||
| docker pull pingcap/sync-diff-inspector:latest | ||
| ``` | ||
|
|
||
| For TiDB versions before v9.0.0: | ||
|
|
||
| + Binary package from the legacy [`tidb-tools`](https://github.com/pingcap/tidb-tools) repository. The sync-diff-inspector binary package is included in the TiDB Toolkit. To download the TiDB Toolkit, see [Download TiDB Tools](/download-ecosystem-tools.md). | ||
|
|
||
| + Docker image (legacy version). Execute the following command to download: | ||
|
|
||
| ```shell | ||
| docker pull pingcap/tidb-tools:latest | ||
| ``` | ||
|
|
||
| ## Restrictions of sync-diff-inspector | ||
|
|
||
| * Online check is not supported for data migration between MySQL and TiDB. Ensure that no data is written into the upstream-downstream checklist, and that data in a certain range is not changed. You can check data in this range by setting `range`. | ||
|
|
@@ -283,8 +304,6 @@ A SQL file contains the tale to which the chunk belong and the range information | |
| DIFF COLUMNS ╏ `K` ╏ `C` ╏ `PAD` | ||
| ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ | ||
| source data ╏ 2501808 ╏ 'hello' ╏ 'world' | ||
| ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ | ||
| target data ╏ 5003616 ╏ '0709824117-9809973320-4456050422' ╏ '1714066100-7057807621-1425865505' | ||
|
Comment on lines
-286
to
-287
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve these two lines. |
||
| ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╋╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ | ||
| */ | ||
| REPLACE INTO `sbtest`.`sbtest99`(`id`,`k`,`c`,`pad`) VALUES (3700000,2501808,'hello','world'); | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.