Impact on the Source Database
When Data Transfer Service (DTS) is used to perform a full data synchronization task, it occupies certain resources of the source database, which may cause the source database load to increase and add pressure to the database. If your database configuration is low, it is recommended to perform data migration during off-peak hours.
Impact on the Target Database
During migration, DTS is used along with the system service account to create a table named based on the task ID (such as dts-xxxxx) in the target TencentDTSData database. This table is used to record CHECKPOINT, enabling resumable transfer in case of task interruption.
Migration Architecture
1. The related instructions for shard migration are as follows:
1.1 Before a sharded cluster is migrated, it is recommended to clean up orphaned documents in the source cluster in advance. Otherwise, it may cause inconsistent data checks after migration. For how to clean up orphaned documents, see the MongoDB official documentation cleanupOrphaned. 1.2 During shard migration, do not enable sharding for the databases and tables under migration on the source to avoid inconsistent data distribution between the source and target. If sharding is enabled for the databases and tables under migration on the source during the process, check the shard status on the target. If sharding is not enabled on the target, manually enable it. For how to enable sharding, see the MongoDB official documentation Shard a Collection. 1.3 If the source is a sharded cluster that runs TencentDB for MongoDB 3.2, all shard keys are processed as hashed shard keys by default during migration. If you want to use ranged shard keys on the target, create the ranged shard keys in advance on the target before data migration.
2. Since single nodes do not support Oplog, incremental migration is not supported when the self-built instance is a single node.
3. For migrations of replica sets and sharded clusters that run MongoDB (version 4.2 and later), incremental migration supports capturing data changes through Change Stream.
4. For MongoDB sharded cluster migrations, using an SRV address to connect to the MongoDB database is supported
Must-Knows
Note:
When the source is AWS DocumentDB, and you choose the Change Stream migration method for incremental migration, you must enable Change Stream; otherwise, incremental data cannot be synchronized.
1. Do not perform the following operations during migration. Otherwise, they will cause the migration task to fail.
Do not modify or delete user information (including usernames, passwords, and permissions) and port numbers in the source and target databases.
Do not perform Oplog cleanup operations on the source database.
During the data migration phase, do not delete the target TencentDTSData database.
2. Exercise caution when operating on the target database data during the data migration phase to avoid data inconsistency.