Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 上游mysql和下游tidb数据不一致?
【TiDB Usage Environment】Production
【TiDB Version】v6.1.0
【Encountered Problem】
Background: I use the DM component to make TiDB a real-time replication slave, with MySQL 5.7 as the upstream.
Problem: Now, through sync_diff_inspector (data verification based on the DM synchronization scenario), I found data inconsistencies. However, I can’t see any issues upon my own inspection.
The sync_diff_inspector configuration is as follows:
check-thread-count = 4
export-fix-sql = true
check-struct-only = false
dm-addr = "http://x.x.x.x:8261"
dm-task = "task_mysql1322033307_incremental"
[task]
output-dir = "./output"
target-check-tables = ["xxx.*"]
The sync_diff_inspector run result summary.txt is as follows:
......
......
......
The following tables contain inconsistent data
+---------------------------------+--------------------+----------------+---------+-----------+
| TABLE | STRUCTURE EQUALITY | DATA DIFF ROWS | UPCOUNT | DOWNCOUNT |
+---------------------------------+--------------------+----------------+---------+-----------+
| `xxxxx`.`xxxx` | true | +6913/-6913 | 57885 | 57885 |
+---------------------------------+--------------------+----------------+---------+-----------+
Time Cost: 19.60125373s
【Reproduction Path】What operations were performed to cause the problem
【Problem Phenomenon and Impact】