- What's New
- Service Overview
- Getting Started
-
User Guide
- Function Overview
- Permissions Management
-
Instance Management
- Buying a DDM Instance
- Splitting Read-only and Read-Write Services
- Changing Class of a DDM Node
- Scaling Out a DDM Instance
- Scaling In a DDM Instance
- Changing Billing Mode of a DDM Instance
- Renewing a DDM Instance
- Restarting a DDM Instance
- Unsubscribing from a DDM Instance
- Deleting a DDM Instance
- Modifying Parameters of a DDM Instance
- Splitting Read and Write Requests
- Configuring a Parameter Template
- Connection Management
-
Parameter Template Management
- Creating a Parameter Template
- Editing a Parameter Template
- Comparing Two Parameter Templates
- Viewing Parameter Change History
- Replicating a Parameter Template
- Applying a Parameter Template
- Viewing Application Records of a Parameter Template
- Modifying the Description of a Parameter Template
- Deleting a Parameter Template
- Task Center
- Schema Management
- Shard Configuration
- Data Node Management
- Account Management
- Backups and Restorations
-
Data Migration
- Overview
- Migration Evaluation
- Scenario 1: Migrating Data from Huawei Cloud RDS to DDM
- Scenario 2: Migrating Data from an On-Premises RDS Instance for MySQL to DDM
- Scenario 3: Migrating Data from a Third-Party RDS for MySQL Instance to DDM
- Scenario 4: Migrating Data from a Self-Built MySQL Instance to DDM
- Scenario 5: Migrating Data from Heterogeneous Databases to DDM
- Scenario 6: Exporting Data from a DDM Instance
- Slow Queries
- Monitoring Management
- Auditing
-
SQL Syntax
- Introduction
- DDL
- DML
- Functions
- Use Constraints
- Supported SQL Statements
- Global Sequence
- Database Management Syntax
- Advanced SQL Functions
- Quotas
- Change History
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
APIs (Recommended)
-
DDM Instances
- Buying a DDM instance
- Querying DDM Instances
- Querying Details of a DDM Instance
- Modifying the Name of a DDM Instance
- Modifying the Security Group of a DDM Instance
- Deleting a DDM Instance
- Restarting a DDM Instance
- Reloading Table Data
- Scaling out a DDM instance
- Scaling in a DDM instance
- Modifying the Read Policy of the Associated DB Instance
- Synchronizing Data Node Information
- Querying Nodes of a DDM Instance
- Querying Details of a DDM Instance Node
- Querying Parameters of a Specified DDM Instance
- Modifying Parameters of a DDM Instance
- Querying DDM Engine Information
- Querying DDM Node Classes Available in an AZ
- Changing the Node Class of a DDM Instance
- Schemas
- DDM Accounts
- Monitoring
-
DDM Instances
- APIs (Unavailable Soon)
- Appendix
- Change History
- SDK Reference
-
Best Practices
- Overview
- Formulating Sharding Rules
- Determining the Number of Shards in a Schema
- Using Broadcast and Unsharded Tables
- Transaction Models
- SQL Standards
- Migrating an Entire RDS Database to DDM
- Migrating an Entire MyCat Database to DDM
- Accessing DDM Using a JDBC Connection Pool
- Logging In to a DDM Instance Using Navicat
- Migrating Data from RDS for MySQL to DDM Using DRS
- Performance White Paper
-
FAQs
- General Questions
-
DDM Usage
- How Does DDM Perform Sharding?
- What Do I Do If I Fail to Connect to a DDM Instance Using the JDBC Driver?
- What Version and Parameters Should I Select?
- Why It Takes So Long Time to Export Data from MySQL Using mysqldump?
- What Do I Do If a Duplicate Primary Key Error Occurs When Data Is Imported into DDM?
- What Should I Do If an Error Message Is Returned When I Specify an Auto-Increment Primary Key During Migration?
- What Do I Do If an Error Is Reported When Parameter Configuration Does Not Time Out?
- Which Should I Delete First, a Schema or its Associated RDS Instances?
- Can I Manually Delete Databases and Accounts Remained in Data Nodes After a Schema Is Deleted?
- SQL Syntax
- RDS-related Questions
- Connection Management
- Resource Freezing, Release, Deletion, and Unsubscription
- Change History
- Videos
Pre-check
Check items in the table below one day before performing a shard configuration task.
Pre-check Items
Item |
Purpose |
Solution to Check Failure |
---|---|---|
Binlog backup time of the DB instance |
Whether your full backups are retained for a time period long enough |
Increase the retention period for full backups on the data node console. |
Binlog enabled on data nodes |
Whether binlog is enabled to support online shard configuration |
If your data node is an RDS instance, no further action is required. If your data node is a GaussDB(for MySQL) instance, set log_bin to true on the GaussDB(for MySQL) console. |
Retention period of binlogs on data nodes |
The retention period of binlogs on data nodes must be long enough. |
If your data node is an RDS instance, no further action is required. If your data node is a GaussDB(for MySQL) instance, set binlog_expire_logs_seconds to 604800 or a larger value. |
Broadcast table consistency |
Ensure broadcast table consistency before performing a shard configuration task. |
Contact DDM O&M personnel. |
Character set and collation of source shards |
Ensure that character set and collation are consistent before and after the shard configuration. |
Contact DDM O&M personnel. |
SQL statements for creating physical stables. |
Ensure that table structure on physical shards is consistent. |
Execute CHECK TABLE to check for table structure inconsistencies and execute ALTER to rectify the inconsistencies. |
Primary keys |
All tables in the source database have primary keys, and the sharding key is a part of the primary keys to ensure data consistency after shards are changed. |
Add primary keys for tables using ALTER if the tables have no primary keys. |
Access to DB instances |
Check whether data nodes can be connected. |
Check security group configurations. |
DB instance parameters |
The source data nodes have the same DB parameter settings as the destination data nodes. |
Modify parameter configurations on the data node console. |
DB instance storage space |
The disk space of data nodes is sufficient during shard configuration. |
Scale up storage space of data nodes.
CAUTION:
This check item is based on the estimated value that may be different from the actual value. |
DB instance time zone |
The source data nodes have the same time zone requirements as the destination data nodes. |
Modify the time zone on the Parameters page of the data node console. |
Common Issues and Solutions
- The shard configuration fails due to table structure inconsistency.
Solution: Execute CHECK TABLE to query table structure inconsistencies and execute ALTER to rectify the inconsistencies. Contact O&M personnel if the inconsistencies cannot be rectified using DDL, for example, the primary or unique keys cannot be modified for data reasons.
- Tables without primary keys cannot be migrated. If a table has no primary keys, it cannot be correctly located and recorded. After a retry is performed during shard configuration, duplicate data may be generated.
- If the sharding key is not part of a primary key, there may be data records (in different physical tables) with duplicate primary key values in a logical table. When these data records are redistributed, they will be routed to the same physical table, and only one record is retained because they have the same primary keys. As a result, data becomes inconsistent before and after the migration, causing the shard configuration failure.
NOTE:
- This error does not occur when the primary key is a globally unique sequence and the number of shards does not change.
Solution: Rectify the data and check again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.