|
Type
|
Description
|
|
Source database limits
|
Tables without a primary key cannot be synchronized. If you synchronize data at the table level and need to edit objects, such as mapping table or column names, a single data synchronization task supports a maximum of 1,000 tables. If you exceed this limit, an error is reported after you submit the task. In this case, split the tables into multiple tasks or configure a task to synchronize the entire database. -
Binary logs:
-
ApsaraDB RDS for MySQL enables binary logging by default. Ensure that the binlog_row_image parameter is set to full. Otherwise, the precheck fails and the synchronization task cannot start. For instructions, see Configure instance parameters.
Important
-
If your source instance is a self-managed MySQL database, enable binary logging and set binlog_format to row and binlog_row_image to full.
-
If your self-managed MySQL database is a dual-primary cluster (where both nodes act as primary and secondary), enable the log_slave_updates parameter so DTS can capture all binary log events. For instructions, see Create an account and configure binary logging for a self-managed MySQL database.
-
The local binary logs for an ApsaraDB RDS for MySQL instance must be retained for at least three days (seven days is recommended). For a self-managed MySQL database, retain local binary logs for at least seven days. Otherwise, DTS may fail to retrieve binary logs, causing the task to fail. In extreme cases, this may cause data inconsistency or data loss. Issues caused by binary log retention periods shorter than DTS requires are not covered under the DTS SLA.
-
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note
During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
-
Data generated by changes that do not write to binary logs—such as data restored from physical backups or created by cascade operations—is not synchronized to the destination database.
Note
If this occurs, remove the affected database or table from the synchronization objects. Then add it back. You can do this only if your business allows it. For more information, see Modify synchronization objects.
-
If your source database is MySQL 8.0.23 or later and contains invisible hidden columns, DTS may not read those columns. This may cause data loss.
Note
Run the ALTER TABLE <table_name> ALTER COLUMN <column_name> SET VISIBLE; command to make the hidden column visible. For more information, see Invisible Columns.
|
|
Other limits
|
If the DDL statements of the source RDS MySQL instance do not follow standard MySQL syntax, the synchronization task may fail or data may be lost. -
If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database.
When you use DMS or the gh-ost tool to perform online DDL operations on the source, DTS synchronizes only the original DDL statements to the destination. In this scenario, DTS does not need to synchronize a large amount of temporary table data, but this may cause tables to be locked at the destination.
Note DTS does not support synchronizing online DDL changes made with tools like pt-online-schema-change. If such changes exist at the source, data may be lost at the destination, or the synchronization instance may fail. Synchronization of INDEX, PARTITION, VIEW, PROCEDURE, FUNCTION, TRIGGER, and FK is supported. The RENAME TABLE operation is not supported. -
If a primary key or unique key conflict occurs while the task is running:
If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
Time-type data in ApsaraDB for ClickHouse has range limitations. If the time data in RDS MySQL is outside this range, the time synchronized to ApsaraDB for ClickHouse will be incorrect. For information about the range limitations, see Time information. The Partition Key cannot be a nullable field. Otherwise, the synchronization task will fail.
Note Only fields of the BIGINT, INT, TIMESTAMP, DATETIME, and DATE types are supported as partition keys. The number of databases to be synchronized does not exceed the limit of ApsaraDB for ClickHouse, which is 256. The names of the databases, tables, and columns to be synchronized comply with the naming conventions of ApsaraDB for ClickHouse. For more information about the conventions, see Object naming conventions. During schema synchronization, DTS adds the _sign, _is_deleted, and _version fields to the destination tables. If you do not select Schema Synchronization when you configure Synchronization Types, you must manually create the tables for receiving data at the destination and add the extra fields to the tables. For information about table creation requirements and field details, see Table and field information. Before synchronizing data, evaluate the performance of the source and destination databases. We recommend that you perform data synchronization during off-peak hours. Otherwise, initial full data synchronization will consume read and write resources of the source and destination databases, which may increase database loads. If you synchronize one or more tables instead of the entire database, do not use tools like pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization will fail. You can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not allow any data other than that from DTS to be written to the destination database. Otherwise, data inconsistency between the source and destination databases will occur. -
If your ApsaraDB RDS for MySQL instance has Always-Encrypted enabled, full data synchronization is not supported.
Note
ApsaraDB RDS for MySQL instances with Transparent Data Encryption (TDE) enabled support schema synchronization, full data synchronization, and incremental data synchronization.
-
If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note
Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
|
Special cases
|
-
For a self-managed MySQL source database:
-
If a primary/secondary switchover occurs in the source database during synchronization, the task fails.
-
DTS calculates latency by comparing the timestamp of the last synchronized record with the current time. If no DML operations run for a long time in the source database, latency reporting may become inaccurate. If latency appears too high, run a DML operation in the source database to update the latency.
Note
If you select a full database for synchronization, create a heartbeat table. Update or write to this table every second.
-
DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command in the source database to advance the binary log offset.
-
If your source database is Amazon Aurora MySQL or another clustered MySQL instance, ensure the domain name or IP address used in the task configuration—and its DNS resolution—always points to a read/write (RW) node. Otherwise, synchronization may fail.
-
For an ApsaraDB RDS for MySQL source database:
-
Read-only instances—such as ApsaraDB RDS for MySQL 5.6 read-only instances—that do not record transaction logs cannot serve as source databases.
-
DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command in the source database to advance the binary log offset.
|