Data Verification
UDTS provides data verification functionality for data transmission tasks to ensure data consistency between the source and target databases. It supports two modes: row count verification and full data verification.
Supported Data Types
Data Source | Data Target | Row Count Verification | Full Data Verification |
---|---|---|---|
MySQL | MySQL | Supported | Supported |
MySQL | TiDB | Supported | Supported |
TiDB | MySQL | Supported | Supported |
TiDB | TiDB | Supported | Supported |
MongoDB | MongoDB | Supported | Supported |
Prerequisites
The following conditions must be met to start a data verification task:
- The full migration task must be in the “Completed” status.
- Incremental/full + incremental tasks must be in the “Synchronizing”/“Synchronized” status. You can start the data verification directly for running tasks or stop the task before verification.
- Data verification is not supported if the task status is “Failed.”
- If there is a running data verification task, starting another data verification task is not supported.
Verification Content
The data verification function only supports verifying the databases and tables migrated through UDTS tasks, and does not support verifying non-migrated databases and tables.
- Row count verification: Only compares the row counts of each table in the source and target databases, without comparing the specific data content.
- Full data verification: Compares the specific data content in the source and target databases.
- For MySQL data verification, all data in both source and target databases is verified. Data that exists only in the source or only in the target is marked as inconsistent.
- For MongoDB data verification, the verification is source-based, checking only if the data in the source database is consistent in the target database.
Usage
- For full migration tasks, you can select “Verify data upon full completion” when creating the task. You can choose between two migration modes, and the data verification task will automatically start after the full migration task is completed.
- Tasks that meet the start conditions can start a data verification task from either the task list page or the task details page by clicking the button.
- Detailed information on data verification can be viewed on the Task Details Page -> Data Verification Page.
Notes
- MySQL full data verification requires the presence of a primary key or unique index in the database tables. Tables without unique indexes will only have row count verified, not specific data content.
- Data verification tasks will consume read resources from the source and target databases, potentially increasing database load. It is recommended to perform data verification during off-peak business hours.
- If data verification is started while there is ongoing data writing to the source database, the verification results of the most recently written data may be inaccurate. It is recommended to perform data verification when the source database is idle.
- When data inconsistency occurs, the front-end page displays at most the top 10 differing data entries. Please download the full data verification report for details. The report file is retained for 3 days; please download it promptly.
- In full data verification, if the data inconsistency for a table exceeds 10,000 rows, the verification for that table will be stopped. Please fix the data and re-verify.