Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.4 KB

dm-shard-merge.md

File metadata and controls

30 lines (20 loc) · 1.4 KB
title summary
TiDB Data Migration Shard Merge
Learn the shard merge feature of DM.

TiDB Data Migration Shard Merge

TiDB Data Migration (DM) supports merging the DML and DDL data in the upstream MySQL/MariaDB sharded tables and migrating the merged data to the downstream TiDB tables.

If you need to migrate and merge MySQL shards of small datasets to TiDB, refer to this tutorial.

Restrictions

Currently, the shard merge feature is supported only in limited scenarios. For details, refer to Sharding DDL usage Restrictions in the pessimistic mode and Sharding DDL usage Restrictions in the optimistic mode.

Configure parameters

In the task configuration file, set shard-mode to pessimistic:

shard-mode: "pessimistic"
# The shard merge mode. Optional modes are ""/"pessimistic"/"optimistic". The "" mode is used by default
# which means sharding DDL merge is disabled. If the task is a shard merge task, set it to the "pessimistic"
# mode. After getting a deep understanding of the principles and restrictions of the "optimistic" mode, you
# can set it to the "optimistic" mode.

Handle sharding DDL locks manually

In some abnormal scenarios, you need to handle sharding DDL Locks manually.