How does the region migrate in a TiDB cluster?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb 集群region 是怎么迁移的

| username: Raymond

Excuse me,
For example, if I expand my TiDB cluster with several TiKVs, it will inevitably migrate regions to these new TiKVs. I think the migration process is:

  1. First, take a snapshot of the corresponding region at a certain point in time, move this snapshot to the new TiKV, the new TiKV imports the snapshot of the corresponding region, and then the incremental data is synchronized through the Raft log.
    My question is how this snapshot is formed. Is it formed by logically scanning the key-value pairs in this region or by other means? Are there any relevant technical articles for reference? Thank you.
| username: TiDBer_wTKU9jv6 | Original post link

Check the logs in the “Raft Learner Scenario”.

| username: cs58_dba | Original post link

I think this is also worth learning about, regarding PD scheduling: 专栏 - 【TiDB 最佳实践系列】PD 调度策略最佳实践 | TiDB 社区

| username: HACK | Original post link

Snapshots are only used when there is a significant difference in data volume.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.