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 4d9c791edc1 Improve migration build and usage doc (#20557)
4d9c791edc1 is described below

commit 4d9c791edc1b9982ef299e126825e68edbc436e6
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Fri Aug 26 16:09:59 2022 +0800

    Improve migration build and usage doc (#20557)
    
    * Fix typo in build doc
    
    * Add DROP MIGRATION PROCESS CONFIGURATION sample in build doc
    
    * Improve DATA CONSISTENCY CHECK and MIGRATE TABLE in usage doc
---
 .../shardingsphere-proxy/migration/build.cn.md     | 18 +++++++++++---
 .../shardingsphere-proxy/migration/build.en.md     | 14 ++++++++++-
 .../shardingsphere-proxy/migration/usage.cn.md     | 29 ++++++++++++++++++++--
 .../shardingsphere-proxy/migration/usage.en.md     | 28 ++++++++++++++++++++-
 4 files changed, 82 insertions(+), 7 deletions(-)

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 cd64cc4609a..bc930a9e4d7 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
@@ -88,7 +88,7 @@ SHOW MIGRATION PROCESS CONFIGURATION;
 
+--------------------------------------------------------------+--------------------------------------+------------------------------------------------------+
 | {"workerThread":40,"batchSize":1000,"shardingSize":10000000} | 
{"workerThread":40,"batchSize":1000} | 
{"type":"MEMORY","props":{"block-queue-size":10000}} |
 
+--------------------------------------------------------------+--------------------------------------+------------------------------------------------------+
-
+```
 
 7.2. 新建配置(可选)。
 
@@ -96,7 +96,7 @@ SHOW MIGRATION PROCESS CONFIGURATION;
 
 完整配置 DistSQL 示例:
 
-```DistSQL
+```sql
 CREATE MIGRATION PROCESS CONFIGURATION (
 READ(
   WORKER_THREAD=40,
@@ -176,9 +176,21 @@ ALTER MIGRATION PROCESS CONFIGURATION (
 READ(
   RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='1000')))
 ), WRITE(
-  RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='1000')))
+  RATE_LIMITER (TYPE(NAME='TPS',PROPERTIES('tps'='1000')))
 )
 );
 ```
 
+7.4. 清除配置。
+
 DistSQL 示例:清空 `READ` 配置、恢复为默认值。
+
+```sql
+DROP MIGRATION PROCESS CONFIGURATION '/READ';
+```
+
+DistSQL 示例:清空 `READ/RATE_LIMITER` 配置。
+
+```sql
+DROP MIGRATION PROCESS CONFIGURATION '/READ/RATE_LIMITER';
+```
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 64ed6bc14b4..1158aab2f36 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
@@ -176,9 +176,21 @@ ALTER MIGRATION PROCESS CONFIGURATION (
 READ(
   RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='1000')))
 ), WRITE(
-  RATE_LIMITER (TYPE(NAME='QPS',PROPERTIES('qps'='1000')))
+  RATE_LIMITER (TYPE(NAME='TPS',PROPERTIES('tps'='1000')))
 )
 );
 ```
 
+7.4. Clear configuration.
+
 DistSQL sample: clear the configuration of `READ` and restore it to the 
default value.
+
+```sql
+DROP MIGRATION PROCESS CONFIGURATION '/READ';
+```
+
+DistSQL sample: clear the configuration of `READ/RATE_LIMITER`.
+
+```sql
+DROP MIGRATION PROCESS CONFIGURATION '/READ/RATE_LIMITER';
+```
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 edd981fb441..8643e315864 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
@@ -193,6 +193,19 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY 
TYPE (NAME='CRC32_MATCH
 
+------------+----------------------+----------------------+-----------------------+-------------------------+
 ```
 
+数据一致性校验算法类型来自:
+```sql
+SHOW MIGRATION CHECK ALGORITHMS;
++-------------+--------------------------------------------------------------+----------------------------+
+| type        | supported_database_types                                     | 
description                |
++-------------+--------------------------------------------------------------+----------------------------+
+| CRC32_MATCH | MySQL                                                        | 
Match CRC32 of records.    |
+| DATA_MATCH  | SQL92,MySQL,MariaDB,PostgreSQL,openGauss,Oracle,SQLServer,H2 | 
Match raw data of records. |
++-------------+--------------------------------------------------------------+----------------------------+
+```
+
+目标端开启数据加密的情况下,不能使用`CRC32_MATCH`。
+
 7. 停止作业。
 
 ```sql
@@ -329,6 +342,12 @@ MIGRATE TABLE ds_0.t_order INTO t_order;
 MIGRATE TABLE ds_0.t_order INTO sharding_db.t_order;
 ```
 
+也可以指定源端schema:
+
+```sql
+MIGRATE TABLE ds_0.public.t_order INTO sharding_db.t_order;
+```
+
 4. 查看数据迁移作业列表。
 
 ```sql
@@ -359,7 +378,7 @@ SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 6. 执行数据一致性校验。
 
 ```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 |
 
+------------+----------------------+----------------------+-----------------------+-------------------------+
@@ -502,6 +521,12 @@ MIGRATE TABLE ds_0.t_order INTO t_order;
 MIGRATE TABLE ds_0.t_order INTO sharding_db.t_order;
 ```
 
+也可以指定源端schema:
+
+```sql
+MIGRATE TABLE ds_0.public.t_order INTO sharding_db.t_order;
+```
+
 4. 查看数据迁移作业列表。
 
 ```sql
@@ -532,7 +557,7 @@ SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 6. 执行数据一致性校验。
 
 ```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 |
 
+------------+----------------------+----------------------+-----------------------+-------------------------+
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 ed0cc134d99..6581d6f9501 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
@@ -181,7 +181,7 @@ SHOW MIGRATION STATUS 'j015d4ee1b8a5e7f95df19babb2794395e8';
 6. Verify data consistency.
 
 ```sql
-CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE 
(NAME='DATA_MATCH');
+CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY TYPE 
(NAME='CRC32_MATCH');
 
+------------+----------------------+----------------------+-----------------------+-------------------------+
 | table_name | source_records_count | target_records_count | 
records_count_matched | records_content_matched |
 
+------------+----------------------+----------------------+-----------------------+-------------------------+
@@ -189,6 +189,20 @@ CHECK MIGRATION 'j015d4ee1b8a5e7f95df19babb2794395e8' BY 
TYPE (NAME='DATA_MATCH'
 
+------------+----------------------+----------------------+-----------------------+-------------------------+
 ```
 
+Data consistency check algorithm list:
+
+```sql
+SHOW MIGRATION CHECK ALGORITHMS;
++-------------+--------------------------------------------------------------+----------------------------+
+| type        | supported_database_types                                     | 
description                |
++-------------+--------------------------------------------------------------+----------------------------+
+| CRC32_MATCH | MySQL                                                        | 
Match CRC32 of records.    |
+| DATA_MATCH  | SQL92,MySQL,MariaDB,PostgreSQL,openGauss,Oracle,SQLServer,H2 | 
Match raw data of records. |
++-------------+--------------------------------------------------------------+----------------------------+
+```
+
+If encrypt rule is configured in target proxy, then `CRC32_MATCH` could be not 
used.
+
 7. Stop the job.
 
 ```sql
@@ -322,6 +336,12 @@ Or you can specify a target logical database.
 MIGRATE TABLE ds_0.t_order INTO sharding_db.t_order;
 ```
 
+Or you can specify a source schema name.
+
+```sql
+MIGRATE TABLE ds_0.public.t_order INTO sharding_db.t_order;
+```
+
 4. Check the data migration job list.
 
 ```sql
@@ -492,6 +512,12 @@ Or you can specify a target logical database.
 MIGRATE TABLE ds_0.t_order INTO sharding_db.t_order;
 ```
 
+Or you can specify a source schema name.
+
+```sql
+MIGRATE TABLE ds_0.public.t_order INTO sharding_db.t_order;
+```
+
 4. Check the data migration job list.
 
 ```sql

Reply via email to