You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by yx...@apache.org on 2022/08/27 11:23:22 UTC

[shardingsphere] branch master updated: Update migration build & usage & reference doc (#20597)

This is an automated email from the ASF dual-hosted git repository.

yx9o pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new cfd0e9a1fcc Update migration build & usage & reference doc (#20597)
cfd0e9a1fcc is described below

commit cfd0e9a1fcc417547380e9b3be4baa790557b29e
Author: Hongsheng Zhong <sa...@126.com>
AuthorDate: Sat Aug 27 19:23:05 2022 +0800

    Update migration build & usage & reference doc (#20597)
    
    * Update scaling RAL DistSQL doc
    
    * Update migration build doc
    
    * Update migration usage and related doc
    
    * Update migration principle illustration
---
 .../content/reference/migration/_index.cn.md       |   4 +-
 .../content/reference/migration/_index.en.md       |   4 +-
 .../distsql/syntax/ral/_index.cn.md                |  28 ++++----
 .../distsql/syntax/ral/_index.en.md                |  28 ++++----
 .../shardingsphere-proxy/migration/build.cn.md     |  10 ++-
 .../shardingsphere-proxy/migration/build.en.md     |  10 ++-
 .../shardingsphere-proxy/migration/usage.cn.md     |  66 +++++++++----------
 .../shardingsphere-proxy/migration/usage.en.md     |  72 +++++++++++----------
 docs/document/static/img/migration/overview.cn.png | Bin 234664 -> 0 bytes
 docs/document/static/img/migration/overview.en.png | Bin 233447 -> 0 bytes
 docs/document/static/img/migration/overview_v2.png | Bin 36120 -> 0 bytes
 docs/document/static/img/migration/principle.png   | Bin 0 -> 171131 bytes
 .../document/static/img/migration/principle_v2.png | Bin 52374 -> 0 bytes
 13 files changed, 111 insertions(+), 111 deletions(-)

diff --git a/docs/document/content/reference/migration/_index.cn.md b/docs/document/content/reference/migration/_index.cn.md
index f30fcb9452a..68bb1d0a0ba 100644
--- a/docs/document/content/reference/migration/_index.cn.md
+++ b/docs/document/content/reference/migration/_index.cn.md
@@ -8,8 +8,6 @@ weight = 6
 
 目前的数据迁移解决方案为:使用一个全新的数据库集群作为迁移目标库。
 
-![迁移概述](https://shardingsphere.apache.org/document/current/img/migration/overview_v2.png)
-
 这种实现方式有以下优点:
 
 1. 迁移过程中,原始数据没有任何影响;
@@ -28,7 +26,7 @@ weight = 6
 3. 增量数据同步阶段;
 4. 流量切换阶段。
 
-![迁移总览](https://shardingsphere.apache.org/document/current/img/migration/principle_v2.png)
+![迁移总览](https://shardingsphere.apache.org/document/current/img/migration/principle.png)
 
 
 ## 执行阶段说明
diff --git a/docs/document/content/reference/migration/_index.en.md b/docs/document/content/reference/migration/_index.en.md
index 752d334695a..57744227ca3 100644
--- a/docs/document/content/reference/migration/_index.en.md
+++ b/docs/document/content/reference/migration/_index.en.md
@@ -8,8 +8,6 @@ weight = 6
 
 The current data migration solution uses a completely new database cluster as the migration target.
 
-![Migration Overview](https://shardingsphere.apache.org/document/current/img/migration/overview_v2.png)
-
 This implementation has the following advantages:
 
 1. No impact on the original data during migration.
@@ -28,7 +26,7 @@ A single data migration mainly consists of the following phases:
 3. The synchronization of incremental data.
 4. Traffic switching .
 
-![Illustration](https://shardingsphere.apache.org/document/current/img/migration/principle_v2.png)
+![Illustration](https://shardingsphere.apache.org/document/current/img/migration/principle.png)
 
 ## Execution Stage Explained
 
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
index 92f10b99adc..846f170bdfe 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md
@@ -18,22 +18,20 @@ RAL (Resource & Rule Administration Language) 为 Apache ShardingSphere 的管
 | CLEAR [SHARDING HINT / READWRITE_SPLITTING HINT]     | 针对当前连接,清除 sharding 或 readwrite_splitting 的 hint 设置       | CLEAR READWRITE_SPLITTING HINT                |
 | SHOW [SHARDING / READWRITE_SPLITTING] HINT STATUS    | 针对当前连接,查询 sharding 或 readwrite_splitting 的 hint 设置       | SHOW READWRITE_SPLITTING HINT STATUS          |
 
-## 弹性伸缩
+## 数据迁移
 
-| 语句                                                    | 说明                                                   | 示例                                         |
-|:------------------------------------------------------|:----------------------------------------------------- |:-------------------------------------------|
-| SHOW MIGRATION LIST                                     | 查询运行列表                                            | SHOW MIGRATION LIST                          |
-| SHOW MIGRATION STATUS jobId                             | 查询任务状态,xx:任务 id                                | SHOW MIGRATION STATUS 1234                   |
-| START MIGRATION jobId                                   | 开始运行任务,xx:任务 id                                | START MIGRATION 1234                         |
-| STOP MIGRATION jobId                                    | 停止运行任务,xx:任务 id                                | STOP MIGRATION 12345                         |
-| CLEAN MIGRATION jobId                                   | 移除任务,xx:任务 id                                   | CLEAN MIGRATION 1234                         |
-| RESET MIGRATION jobId                                   | 重置任务进度,xx:任务 id                                | RESET MIGRATION 1234                         |
-| CHECK MIGRATION jobId                                   | 数据一致性校验,使用 `server.yaml` 里的校验算法,xx:任务 id | CHECK MIGRATION 1234                         |
-| SHOW MIGRATION CHECK ALGORITHMS                         | 展示可用的一致性校验算法                                  | SHOW MIGRATION CHECK ALGORITHMS              |
-| CHECK MIGRATION jobId (by type(name=algorithmTypeName)? | 数据一致性校验,使用指定的校验算法                          | CHECK MIGRATION 1234 by type(name="DEFAULT") |
-| STOP MIGRATION SOURCE WRITING jobId                     | 旧的 ShardingSphere 数据源停写,xx:任务 id               | STOP MIGRATION SOURCE WRITING 1234           |
-| RESTORE MIGRATION SOURCE WRITING jobId                  | 旧的 ShardingSphere 数据源恢复写,xx:任务 id             | RESTORE MIGRATION SOURCE WRITING 1234        |
-| APPLY MIGRATION jobId                                   | 切换至新的 ShardingSphere 元数据,xx:任务 id             | APPLY MIGRATION 1234                         |
+| 语句                                                        | 说明                     | 示例                                              |
+|:----------------------------------------------------------|------------------------|:------------------------------------------------|
+| MIGRATE TABLE ds.schema.table INTO table                  | 从源端迁移到目标端              | MIGRATE TABLE ds_0.public.t_order INTO t_order  |
+| SHOW MIGRATION LIST                                       | 查询运行列表                 | SHOW MIGRATION LIST                             |
+| SHOW MIGRATION STATUS jobId                               | 查询作业状态                 | SHOW MIGRATION STATUS 1234                      |
+| STOP MIGRATION jobId                                      | 停止作业                   | STOP MIGRATION 12345                            |
+| START MIGRATION jobId                                     | 开启停止的作业                | START MIGRATION 1234                            |
+| CHECK MIGRATION jobId                                     | 数据一致性校验                | CHECK MIGRATION 1234                            |
+| SHOW MIGRATION CHECK ALGORITHMS                           | 展示可用的一致性校验算法           | SHOW MIGRATION CHECK ALGORITHMS                 |
+| CHECK MIGRATION jobId (by type(name=algorithmTypeName)?   | 数据一致性校验,使用指定的校验算法      | CHECK MIGRATION 1234 by type(name="DATA_MATCH") |
+| ROLLBACK MIGRATION jobId                                  | 撤销作业。注意:该语句会清理目标端表,请谨慎操作 | ROLLBACK MIGRATION 1234                            |
+| COMMIT MIGRATION jobId                                    | 完成作业                   | COMMIT MIGRATION 1234                           |
 
 ## 熔断
 
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
index 3458cc9b221..949a279f2a7 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.en.md
@@ -18,22 +18,20 @@ RAL (Resource & Rule Administration Language) responsible for hint, circuit brea
 | CLEAR [SHARDING HINT / READWRITE_SPLITTING HINT]     | For current connection, clear hint settings of sharding or readwrite splitting                              | CLEAR READWRITE_SPLITTING HINT                 |
 | SHOW [SHARDING / READWRITE_SPLITTING] HINT STATUS    | For current connection, query hint settings of sharding or readwrite splitting                              | SHOW READWRITE_SPLITTING HINT STATUS           |
 
-## Scaling
+## Migration
 
-| Statement                                             | Function                                                          | Example                                    |
-|:------------------------------------------------------|:------------------------------------------------------------------|:-------------------------------------------|
-| SHOW MIGRATION LIST                                     | Query running list                                                | SHOW MIGRATION LIST                          |
-| SHOW MIGRATION STATUS jobId                             | Query migration status, xx: jobId                                   | SHOW MIGRATION STATUS 1234                   |
-| START MIGRATION jobId                                   | Start migration, xx: jobId                                          | START MIGRATION 1234                         |
-| STOP MIGRATION jobId                                    | Stop migration, xx: jobId                                           | STOP MIGRATION 1234                          |
-| CLEAN MIGRATION jobId                                   | Clean migration, xx: jobId                                          | CLEAN MIGRATION 1234                         |
-| RESET MIGRATION jobId                                   | reset progress, xx: jobId                                         | RESET MIGRATION 1234                         |
-| CHECK MIGRATION jobId                                   | Data consistency check with algorithm in `server.yaml`, xx: jobId | CHECK MIGRATION 1234                         |
-| SHOW MIGRATION CHECK ALGORITHMS                         | Show available consistency check algorithms                       | SHOW MIGRATION CHECK ALGORITHMS              |
-| CHECK MIGRATION jobId (by type(name=algorithmTypeName)? | Data consistency check with defined algorithm                     | CHECK MIGRATION 1234 by type(name="DEFAULT") |
-| STOP MIGRATION SOURCE WRITING jobId                     | The source ShardingSphere data source is discontinued, xx: jobId  | STOP MIGRATION SOURCE WRITING 1234           |
-| RESTORE MIGRATION SOURCE WRITING jobId                  | Restore source data source writing, xx: jobId                     | RESTORE MIGRATION SOURCE WRITING 1234        |
-| APPLY MIGRATION jobId                                   | Switch to target ShardingSphere metadata, xx: jobId               | APPLY MIGRATION 1234                         |
+| Statement                                                | Function                                       | Example                                          |
+|:---------------------------------------------------------|:-----------------------------------------------|:-------------------------------------------------|
+| MIGRATE TABLE ds.schema.table INTO table                 | Migrate table from source to target            | MIGRATE TABLE ds_0.public.t_order INTO t_order   |
+| SHOW MIGRATION LIST                                      | Query running list                             | SHOW MIGRATION LIST                              |
+| SHOW MIGRATION STATUS jobId                              | Query migration status                         | SHOW MIGRATION STATUS 1234                       |
+| STOP MIGRATION jobId                                     | Stop migration                                 | STOP MIGRATION 1234                              |
+| START MIGRATION jobId                                    | Start stopped migration                        | START MIGRATION 1234                             |
+| ROLLBACK MIGRATION jobId                                 | Rollback migration                             | ROLLBACK MIGRATION 1234                          |
+| COMMIT MIGRATION jobId                                   | Commit migration                               | COMMIT MIGRATION 1234                            |
+| CHECK MIGRATION jobId                                    | Data consistency check                         | CHECK MIGRATION 1234                             |
+| SHOW MIGRATION CHECK ALGORITHMS                          | Show available consistency check algorithms    | SHOW MIGRATION CHECK ALGORITHMS                  |
+| CHECK MIGRATION jobId (by type(name=algorithmTypeName)?  | Data consistency check with defined algorithm  | CHECK MIGRATION 1234 by type(name="DATA_MATCH")  |
 
 ## Circuit Breaker
 
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/migration/build.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/migration/build.cn.md
index bc930a9e4d7..608fae31268 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/migration/build.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/migration/build.cn.md
@@ -51,12 +51,16 @@ mode:
 
 4. 引入 JDBC 驱动。
 
-如果后端连接以下数据库,请下载相应 JDBC 驱动 jar 包,并将其放入 `${shardingsphere-proxy}/lib` 目录。
+proxy 已包含 PostgreSQL JDBC 驱动。
+
+如果后端连接以下数据库,请下载相应 JDBC 驱动 jar 包,并将其放入 `${shardingsphere-proxy}/ext-lib` 目录。
 
 | 数据库                 | JDBC 驱动                                                                                                                                                          | 参考                                                                                             |
 | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
 | MySQL                 | [mysql-connector-java-5.1.47.jar]( https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.47/mysql-connector-java-5.1.47.jar )                              | [Connector/J Versions]( https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-versions.html ) |
-| openGauss             | [opengauss-jdbc-2.0.1-compatibility.jar]( https://repo1.maven.org/maven2/org/opengauss/opengauss-jdbc/2.0.1-compatibility/opengauss-jdbc-2.0.1-compatibility.jar ) |                                                                                                  |
+| openGauss             | [opengauss-jdbc-3.0.0.jar]( https://repo1.maven.org/maven2/org/opengauss/opengauss-jdbc/3.0.0/opengauss-jdbc-3.0.0.jar ) |                                                                                                  |
+
+如果是异构迁移,源端支持范围更广的数据库,比如:Oracle。JDBC 驱动处理方式同上。
 
 5. 启动 ShardingSphere-Proxy:
 
@@ -82,7 +86,7 @@ SHOW MIGRATION PROCESS CONFIGURATION;
 
 默认配置如下:
 
-```sql
+```
 +--------------------------------------------------------------+--------------------------------------+------------------------------------------------------+
 | read                                                         | write                                | stream_channel                                       |
 +--------------------------------------------------------------+--------------------------------------+------------------------------------------------------+
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/migration/build.en.md b/docs/document/content/user-manual/shardingsphere-proxy/migration/build.en.md
index 1158aab2f36..296a440d37d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/migration/build.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/migration/build.en.md
@@ -51,12 +51,16 @@ mode:
 
 4. Introduce JDBC driver.
 
-If the backend is connected to the following databases, download the corresponding JDBC driver jar package and put it into the `${shardingsphere-proxy}/lib` directory.
+Proxy has included JDBC driver of PostgreSQL.
+
+If the backend is connected to the following databases, download the corresponding JDBC driver jar package and put it into the `${shardingsphere-proxy}/ext-lib` directory.
 
 | Database              | JDBC Driver                                                                                                                                                        | Reference                                                                                        |
 | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
 | MySQL                 | [mysql-connector-java-5.1.47.jar]( https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.47/mysql-connector-java-5.1.47.jar )                              | [Connector/J Versions]( https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-versions.html ) |
-| openGauss             | [opengauss-jdbc-2.0.1-compatibility.jar]( https://repo1.maven.org/maven2/org/opengauss/opengauss-jdbc/2.0.1-compatibility/opengauss-jdbc-2.0.1-compatibility.jar ) |                                                                                                  |
+| openGauss             | [opengauss-jdbc-3.0.0.jar]( https://repo1.maven.org/maven2/org/opengauss/opengauss-jdbc/3.0.0/opengauss-jdbc-3.0.0.jar ) |                                                                                                  |
+
+If you are migrating to a heterogeneous database, then you could use more types of database, e.g. Oracle. Introduce JDBC driver as above too.
 
 5. Start ShardingSphere-Proxy:
 
@@ -82,7 +86,7 @@ SHOW MIGRATION PROCESS CONFIGURATION;
 
 The default configuration is as follows.
 
-```sql
+```
 +--------------------------------------------------------------+--------------------------------------+------------------------------------------------------+
 | read                                                         | write                                | stream_channel                                       |
 +--------------------------------------------------------------+--------------------------------------+------------------------------------------------------+
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.cn.md
index 8643e315864..dda4f59e7a7 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.cn.md
@@ -3,11 +3,11 @@ title = "使用手册"
 weight = 2
 +++
 
-## MySQL使用手册
+## MySQL 使用手册
 
 ### 环境要求
 
-支持的MySQL版本:5.1.15 ~ 5.7.x。
+支持的 MySQL 版本:5.1.15 ~ 5.7.x。
 
 ### 权限要求
 
@@ -204,31 +204,29 @@ SHOW MIGRATION CHECK ALGORITHMS;
 +-------------+--------------------------------------------------------------+----------------------------+
 ```
 
-目标端开启数据加密的情况下,不能使用`CRC32_MATCH`。
+目标端开启数据加密的情况需要使用`DATA_MATCH`。
 
-7. 停止作业。
+异构迁移需要使用`DATA_MATCH`。
 
-```sql
-STOP MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
-```
-
-8. 清理作业。
+7. 完成作业。
 
 ```sql
-CLEAN MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+COMMIT MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 ```
 
-9. 刷新元数据。
+8. 刷新元数据。
 
 ```sql
 REFRESH TABLE METADATA;
 ```
 
-## PostgreSQL使用手册
+更多 DistSQL 请参见 [RAL #数据迁移](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/#%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB)。
+
+## PostgreSQL 使用手册
 
 ### 环境要求
 
-支持的PostgreSQL版本:9.4 或以上版本。
+支持的 PostgreSQL 版本:9.4 或以上版本。
 
 ### 权限要求
 
@@ -248,8 +246,10 @@ max_connections = 600
 
 3. 配置 PostgreSQL 允许 Proxy 拥有 replication 权限。
 
-pg_hba.conf实例配置:
+`pg_hba.conf` 示例配置:
+```
 host replication repl_acct 0.0.0.0/0 md5
+```
 
 详情请参见 [The pg_hba.conf File](https://www.postgresql.org/docs/9.6/auth-pg-hba-conf.html)。
 
@@ -386,29 +386,25 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 ```
 
-7. 停止作业。
-
-```sql
-STOP MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
-```
-
-8. 清理作业。
+7. 完成作业。
 
 ```sql
-CLEAN MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+COMMIT MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 ```
 
-9. 刷新元数据。
+8. 刷新元数据。
 
 ```sql
 REFRESH TABLE METADATA;
 ```
 
-## openGauss使用手册
+更多 DistSQL 请参见 [RAL #数据迁移](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/#%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB)。
+
+## openGauss 使用手册
 
 ### 环境要求
 
-支持的openGauss版本:2.0.1 ~ 3.0.0。
+支持的 openGauss 版本:2.0.1 ~ 3.0.0。
 
 ### 权限要求
 
@@ -425,10 +421,12 @@ max_connections = 600
 
 详情请参见 [Write Ahead Log](https://opengauss.org/en/docs/2.0.1/docs/Developerguide/settings.html) 和 [Replication](https://opengauss.org/en/docs/2.0.1/docs/Developerguide/sending-server.html)。
 
-2. 配置 PostgreSQL 允许 Proxy 拥有 replication 权限。
+2. 配置 openGauss 允许 Proxy 拥有 replication 权限。
 
-pg_hba.conf实例配置:
+`pg_hba.conf` 示例配置:
+```
 host replication repl_acct 0.0.0.0/0 md5
+```
 
 详情请参见 [Configuring Client Access Authentication](https://opengauss.org/en/docs/2.0.1/docs/Developerguide/configuring-client-access-authentication.html) 和 [Example: Logic Replication Code](https://opengauss.org/en/docs/2.0.1/docs/Developerguide/example-logic-replication-code.html)。
 
@@ -565,20 +563,16 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 ```
 
-7. 停止作业。
+7. 完成作业。
 
 ```sql
-STOP MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+COMMIT MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 ```
 
-8. 清理作业。
-
-```sql
-CLEAN MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
-```
-
-9. 刷新元数据。
+8. 刷新元数据。
 
 ```sql
 REFRESH TABLE METADATA;
 ```
+
+更多 DistSQL 请参见 [RAL #数据迁移](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/#%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB)。
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.en.md b/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.en.md
index 6581d6f9501..e8cc18e8353 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/migration/usage.en.md
@@ -159,7 +159,7 @@ SHOW MIGRATION LIST;
 
 Result example:
 
-```sql
+```
 +-------------------------------------+---------+----------------------+--------+---------------------+-----------+
 | id                                  | tables  | sharding_total_count | active | create_time         | stop_time |
 +-------------------------------------+---------+----------------------+--------+---------------------+-----------+
@@ -169,7 +169,7 @@ Result example:
 
 5. View the data migration details.
 
-```sql
+```
 SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------+-------------+--------------------------+--------+-------------------------------+--------------------------+
 | item | data_source | status                   | active | inventory_finished_percentage | incremental_idle_seconds |
@@ -180,7 +180,7 @@ SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 
 6. Verify data consistency.
 
-```sql
+```
 CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE (NAME='CRC32_MATCH');
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 | table_name | source_records_count | target_records_count | records_count_matched | records_content_matched |
@@ -191,7 +191,7 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE (NAME='CRC32_MATCH
 
 Data consistency check algorithm list:
 
-```sql
+```
 SHOW MIGRATION CHECK ALGORITHMS;
 +-------------+--------------------------------------------------------------+----------------------------+
 | type        | supported_database_types                                     | description                |
@@ -201,20 +201,24 @@ SHOW MIGRATION CHECK ALGORITHMS;
 +-------------+--------------------------------------------------------------+----------------------------+
 ```
 
-If encrypt rule is configured in target proxy, then `CRC32_MATCH` could be not used.
+If encrypt rule is configured in target proxy, then `DATA_MATCH` could be used.
 
-7. Stop the job.
+If you are migrating to a heterogeneous database, then `DATA_MATCH` could be used.
+
+7. Commit the job.
 
 ```sql
-STOP MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+COMMIT MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 ```
 
-8. Clear the job.
+8. Refresh table metadata.
 
 ```sql
-CLEAN MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+REFRESH TABLE METADATA;
 ```
 
+Please refer to [RAL#Migration](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#migration) for more details.
+
 ## PostgreSQL user guide
 
 ### Environment
@@ -239,9 +243,8 @@ Please refer to [Write Ahead Log](https://www.postgresql.org/docs/9.6/runtime-co
 
 3. Configure PostgreSQL and grant Proxy the replication permission.
 
-`pg_hba.conf` instance configuration: 
-
-```sql
+`pg_hba.conf` instance configuration:
+```
 host replication repl_acct 0.0.0.0/0 md5
 ```
 
@@ -350,7 +353,7 @@ SHOW MIGRATION LIST;
 
 Result sample: 
 
-```sql
+```
 +-------------------------------------+---------+----------------------+--------+---------------------+-----------+
 | id                                  | tables  | sharding_total_count | active | create_time         | stop_time |
 +-------------------------------------+---------+----------------------+--------+---------------------+-----------+
@@ -360,7 +363,7 @@ Result sample:
 
 5. View the data migration details.
 
-```sql
+```
 SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------+-------------+--------------------------+--------+-------------------------------+--------------------------+
 | item | data_source | status                   | active | inventory_finished_percentage | incremental_idle_seconds |
@@ -371,8 +374,8 @@ SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 
 6. Verify data consistency.
 
-```sql
-CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE (NAME='DATA_MATCH');
+```
+CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 | table_name | source_records_count | target_records_count | records_count_matched | records_content_matched |
 +------------+----------------------+----------------------+-----------------------+-------------------------+
@@ -380,18 +383,20 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE (NAME='DATA_MATCH'
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 ```
 
-7. Stop the job.
+7. Commit the job.
 
 ```sql
-STOP MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+COMMIT MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 ```
 
-8. Clear the job.
+8. Refresh table metadata.
 
 ```sql
-CLEAN MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+REFRESH TABLE METADATA;
 ```
 
+Please refer to [RAL#Migration](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#migration) for more details.
+
 ## openGauss user guide
 
 ### Environment
@@ -413,11 +418,10 @@ max_connections = 600
 
 Please refer to [Write Ahead Log](https://opengauss.org/en/docs/2.0.1/docs/Developerguide/settings.html) and [Replication](https://opengauss.org/en/docs/2.0.1/docs/Developerguide/sending-server.html) for details.
 
-2. Configure PostgreSQL and grant Proxy the replication permission.
+2. Configure openGauss and grant Proxy the replication permission.
 
-`pg_hba.conf` instance configuration: 
-
-```sql
+`pg_hba.conf` instance configuration:
+```
 host replication repl_acct 0.0.0.0/0 md5
 ```
 
@@ -526,7 +530,7 @@ SHOW MIGRATION LIST;
 
 Result example: 
 
-```sql
+```
 +-------------------------------------+---------+----------------------+--------+---------------------+-----------+
 | id                                  | tables  | sharding_total_count | active | create_time         | stop_time |
 +-------------------------------------+---------+----------------------+--------+---------------------+-----------+
@@ -536,7 +540,7 @@ Result example:
 
 5. View the data migration details.
 
-```sql
+```
 SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------+-------------+--------------------------+--------+-------------------------------+--------------------------+
 | item | data_source | status                   | active | inventory_finished_percentage | incremental_idle_seconds |
@@ -547,8 +551,8 @@ SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 
 6. Verify data consistency.
 
-```sql
-CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE (NAME='DATA_MATCH');
+```
+CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 | table_name | source_records_count | target_records_count | records_count_matched | records_content_matched |
 +------------+----------------------+----------------------+-----------------------+-------------------------+
@@ -556,14 +560,16 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE (NAME='DATA_MATCH'
 +------------+----------------------+----------------------+-----------------------+-------------------------+
 ```
 
-7. Stop the job.
+7. Commit the job.
 
 ```sql
-STOP MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
+COMMIT MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
 ```
 
-8. Clear the job.
+8. Refresh table metadata.
 
+```sql
+REFRESH TABLE METADATA;
 ```
-CLEAN MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8';
-```
+
+Please refer to [RAL#Migration](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#migration) for more details.
diff --git a/docs/document/static/img/migration/overview.cn.png b/docs/document/static/img/migration/overview.cn.png
deleted file mode 100644
index 4bd761116fa..00000000000
Binary files a/docs/document/static/img/migration/overview.cn.png and /dev/null differ
diff --git a/docs/document/static/img/migration/overview.en.png b/docs/document/static/img/migration/overview.en.png
deleted file mode 100644
index 3edc7250c85..00000000000
Binary files a/docs/document/static/img/migration/overview.en.png and /dev/null differ
diff --git a/docs/document/static/img/migration/overview_v2.png b/docs/document/static/img/migration/overview_v2.png
deleted file mode 100644
index 96334e0c980..00000000000
Binary files a/docs/document/static/img/migration/overview_v2.png and /dev/null differ
diff --git a/docs/document/static/img/migration/principle.png b/docs/document/static/img/migration/principle.png
new file mode 100644
index 00000000000..f7fd0d4c3f7
Binary files /dev/null and b/docs/document/static/img/migration/principle.png differ
diff --git a/docs/document/static/img/migration/principle_v2.png b/docs/document/static/img/migration/principle_v2.png
deleted file mode 100644
index dfe919663a8..00000000000
Binary files a/docs/document/static/img/migration/principle_v2.png and /dev/null differ