From 41d9f0c541aa8828ef1afa5e8cf0b1a77c56aaee Mon Sep 17 00:00:00 2001 From: Hongsheng Zhong Date: Wed, 20 Sep 2023 15:05:51 +0800 Subject: [PATCH] Update migration usage doc (#28471) --- .../migration/usage.cn.md | 127 +++++++++--------- .../migration/usage.en.md | 126 ++++++++--------- 2 files changed, 127 insertions(+), 126 deletions(-) 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 f9b4708080ce9..699e9b357184a 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 @@ -173,32 +173,32 @@ SHOW MIGRATION LIST; 示例结果: ``` -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| id | tables | job_item_count | active | create_time | stop_time | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1 | true | 2022-10-13 11:16:01 | NULL | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| id | tables | job_item_count | active | create_time | stop_time | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| j0102p00002333dcb3d9db141cef14bed6fbf1ab54 | ds_0.t_order | 1 | true | 2023-09-20 14:41:32 | NULL | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ ``` 5. 查看数据迁移详情。 ```sql -SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 示例结果: ``` -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| item | data_source | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| 0 | ds_0 | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | 81 | | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| item | data_source | tables | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| 0 | ds_0 | ds_0.t_order | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | | | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ``` 6. 执行数据一致性校验。 ```sql -CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MATCH'); +CHECK MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54' BY TYPE (NAME='DATA_MATCH'); ``` 数据一致性校验算法类型来自: @@ -208,12 +208,12 @@ 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. | -+-------------+--------------------------------------------------------------+----------------------------+ ++-------------+--------------+--------------------------------------------------------------+----------------------------+ +| type | type_aliases | supported_database_types | description | ++-------------+--------------+--------------------------------------------------------------+----------------------------+ +| CRC32_MATCH | | MySQL,MariaDB,H2 | Match CRC32 of records. | +| DATA_MATCH | | SQL92,MySQL,PostgreSQL,openGauss,Oracle,SQLServer,MariaDB,H2 | Match raw data of records. | ++-------------+--------------+--------------------------------------------------------------+----------------------------+ ``` 目标端开启数据加密的情况需要使用`DATA_MATCH`。 @@ -222,21 +222,22 @@ SHOW MIGRATION CHECK ALGORITHMS; 查询数据一致性校验进度: ```sql -SHOW MIGRATION CHECK STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION CHECK STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 示例结果: -``` +---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| t_order | true | 100 | 0 | 2022-10-13 11:18:15.171 | 2022-10-13 11:18:15.878 | 0 | | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ +``` ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| tables | result | check_failed_tables | active | inventory_finished_percentage | inventory_remaining_seconds | incremental_idle_seconds | check_begin_time | check_end_time | duration_seconds | algorithm_type | algorithm_props | error_message | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| ds_0.t_order | true | | false | 100 | 0 | | 2023-09-20 14:45:31.992 | 2023-09-20 14:45:33.519 | 1 | DATA_MATCH | | | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ ``` 7. 完成作业。 ```sql -COMMIT MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +COMMIT MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 更多 DistSQL 请参见 [RAL #数据迁移](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/#%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB)。 @@ -398,52 +399,52 @@ SHOW MIGRATION LIST; 示例结果: ```sql -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| id | tables | job_item_count | active | create_time | stop_time | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1 | true | 2022-10-13 11:16:01 | NULL | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| id | tables | job_item_count | active | create_time | stop_time | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| j0102p00002333dcb3d9db141cef14bed6fbf1ab54 | ds_0.t_order | 1 | true | 2023-09-20 14:41:32 | NULL | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ ``` 5. 查看数据迁移详情。 ```sql -SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 示例结果: ``` -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| item | data_source | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| 0 | ds_0 | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | 81 | | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| item | data_source | tables | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| 0 | ds_0 | ds_0.t_order | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | | | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ``` 6. 执行数据一致性校验。 ```sql -CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +CHECK MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 查询数据一致性校验进度: ```sql -SHOW MIGRATION CHECK STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION CHECK STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 示例结果: ``` -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| t_order | true | 100 | 0 | 2022-10-13 11:18:15.171 | 2022-10-13 11:18:15.878 | 0 | | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| tables | result | check_failed_tables | active | inventory_finished_percentage | inventory_remaining_seconds | incremental_idle_seconds | check_begin_time | check_end_time | duration_seconds | algorithm_type | algorithm_props | error_message | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| ds_0.t_order | true | | false | 100 | 0 | | 2023-09-20 14:45:31.992 | 2023-09-20 14:45:33.519 | 1 | DATA_MATCH | | | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ ``` 7. 完成作业。 ```sql -COMMIT MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +COMMIT MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 更多 DistSQL 请参见 [RAL #数据迁移](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/#%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB)。 @@ -654,52 +655,52 @@ SHOW MIGRATION LIST; 示例结果: ```sql -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| id | tables | job_item_count | active | create_time | stop_time | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1 | true | 2022-10-13 11:16:01 | NULL | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| id | tables | job_item_count | active | create_time | stop_time | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| j0102p00002333dcb3d9db141cef14bed6fbf1ab54 | ds_0.t_order | 1 | true | 2023-09-20 14:41:32 | NULL | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ ``` 5. 查看数据迁移详情。 ```sql -SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 示例结果: ``` -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| item | data_source | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| 0 | ds_0 | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | 81 | | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| item | data_source | tables | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| 0 | ds_0 | ds_0.t_order | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | | | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ``` 6. 执行数据一致性校验。 ```sql -CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +CHECK MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 查询数据一致性校验进度: ```sql -SHOW MIGRATION CHECK STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION CHECK STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 示例结果: ``` -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| t_order | true | 100 | 0 | 2022-10-13 11:18:15.171 | 2022-10-13 11:18:15.878 | 0 | | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| tables | result | check_failed_tables | active | inventory_finished_percentage | inventory_remaining_seconds | incremental_idle_seconds | check_begin_time | check_end_time | duration_seconds | algorithm_type | algorithm_props | error_message | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| ds_0.t_order | true | | false | 100 | 0 | | 2023-09-20 14:45:31.992 | 2023-09-20 14:45:33.519 | 1 | DATA_MATCH | | | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ ``` 7. 完成作业。 ```sql -COMMIT MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +COMMIT MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` 更多 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 1f21829207b93..3c58ed934da77 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 @@ -169,32 +169,32 @@ SHOW MIGRATION LIST; Result example: ``` -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| id | tables | job_item_count | active | create_time | stop_time | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1 | true | 2022-10-13 11:16:01 | NULL | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| id | tables | job_item_count | active | create_time | stop_time | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| j0102p00002333dcb3d9db141cef14bed6fbf1ab54 | ds_0.t_order | 1 | true | 2023-09-20 14:41:32 | NULL | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ ``` 5. View the data migration details. ```sql -SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Result example: ``` -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| item | data_source | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| 0 | ds_0 | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | 81 | | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| item | data_source | tables | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| 0 | ds_0 | ds_0.t_order | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | | | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ``` 6. Verify data consistency. ```sql -CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MATCH'); +CHECK MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54' BY TYPE (NAME='DATA_MATCH'); ``` Data consistency check algorithm list: @@ -205,12 +205,12 @@ SHOW MIGRATION CHECK ALGORITHMS; Result example: ``` -+-------------+--------------------------------------------------------------+----------------------------+ -| 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. | -+-------------+--------------------------------------------------------------+----------------------------+ ++-------------+--------------+--------------------------------------------------------------+----------------------------+ +| type | type_aliases | supported_database_types | description | ++-------------+--------------+--------------------------------------------------------------+----------------------------+ +| CRC32_MATCH | | MySQL,MariaDB,H2 | Match CRC32 of records. | +| DATA_MATCH | | SQL92,MySQL,PostgreSQL,openGauss,Oracle,SQLServer,MariaDB,H2 | Match raw data of records. | ++-------------+--------------+--------------------------------------------------------------+----------------------------+ ``` If encrypt rule is configured in target proxy, then `DATA_MATCH` could be used. @@ -219,22 +219,22 @@ If you are migrating to a heterogeneous database, then `DATA_MATCH` could be use Query data consistency check progress: ```sql -SHOW MIGRATION CHECK STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION CHECK STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Result example: ``` -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| t_order | true | 100 | 0 | 2022-10-13 11:18:15.171 | 2022-10-13 11:18:15.878 | 0 | | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| tables | result | check_failed_tables | active | inventory_finished_percentage | inventory_remaining_seconds | incremental_idle_seconds | check_begin_time | check_end_time | duration_seconds | algorithm_type | algorithm_props | error_message | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| ds_0.t_order | true | | false | 100 | 0 | | 2023-09-20 14:45:31.992 | 2023-09-20 14:45:33.519 | 1 | DATA_MATCH | | | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ ``` 7. Commit the job. ```sql -COMMIT MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +COMMIT MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Please refer to [RAL#Migration](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#migration) for more details. @@ -395,53 +395,53 @@ SHOW MIGRATION LIST; Result example: ``` -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| id | tables | job_item_count | active | create_time | stop_time | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1 | true | 2022-10-13 11:16:01 | NULL | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| id | tables | job_item_count | active | create_time | stop_time | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| j0102p00002333dcb3d9db141cef14bed6fbf1ab54 | ds_0.t_order | 1 | true | 2023-09-20 14:41:32 | NULL | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ ``` 5. View the data migration details. ```sql -SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Result example: ``` -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| item | data_source | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| 0 | ds_0 | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | 81 | | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| item | data_source | tables | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| 0 | ds_0 | ds_0.t_order | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | | | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ``` 6. Verify data consistency. ``` -CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +CHECK MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; Query OK, 0 rows affected (0.09 sec) ``` Query data consistency check progress: ```sql -SHOW MIGRATION CHECK STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION CHECK STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Result example: ``` -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| t_order | true | 100 | 0 | 2022-10-13 11:18:15.171 | 2022-10-13 11:18:15.878 | 0 | | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| tables | result | check_failed_tables | active | inventory_finished_percentage | inventory_remaining_seconds | incremental_idle_seconds | check_begin_time | check_end_time | duration_seconds | algorithm_type | algorithm_props | error_message | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| ds_0.t_order | true | | false | 100 | 0 | | 2023-09-20 14:45:31.992 | 2023-09-20 14:45:33.519 | 1 | DATA_MATCH | | | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ ``` 7. Commit the job. ```sql -COMMIT MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +COMMIT MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Please refer to [RAL#Migration](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#migration) for more details. @@ -653,53 +653,53 @@ SHOW MIGRATION LIST; Result example: ``` -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| id | tables | job_item_count | active | create_time | stop_time | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ -| j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1 | true | 2022-10-13 11:16:01 | NULL | -+---------------------------------------+---------+----------------------+--------+---------------------+-----------+ ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| id | tables | job_item_count | active | create_time | stop_time | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ +| j0102p00002333dcb3d9db141cef14bed6fbf1ab54 | ds_0.t_order | 1 | true | 2023-09-20 14:41:32 | NULL | ++--------------------------------------------+--------------+----------------+--------+---------------------+-----------+ ``` 5. View the data migration details. ```sql -SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Result example: ``` -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| item | data_source | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ -| 0 | ds_0 | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | 81 | | -+------+-------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| item | data_source | tables | status | active | processed_records_count | inventory_finished_percentage | incremental_idle_seconds | error_message | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ +| 0 | ds_0 | ds_0.t_order | EXECUTE_INCREMENTAL_TASK | true | 6 | 100 | | | ++------+-------------+--------------+--------------------------+--------+-------------------------+-------------------------------+--------------------------+---------------+ ``` 6. Verify data consistency. ``` -CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +CHECK MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; Query OK, 0 rows affected (0.09 sec) ``` Query data consistency check progress: ```sql -SHOW MIGRATION CHECK STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +SHOW MIGRATION CHECK STATUS 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Result example: ``` -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| tables | result | finished_percentage | remaining_seconds | check_begin_time | check_end_time | duration_seconds | error_message | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ -| t_order | true | 100 | 0 | 2022-10-13 11:18:15.171 | 2022-10-13 11:18:15.878 | 0 | | -+---------+--------+---------------------+-------------------+-------------------------+-------------------------+------------------+---------------+ ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| tables | result | check_failed_tables | active | inventory_finished_percentage | inventory_remaining_seconds | incremental_idle_seconds | check_begin_time | check_end_time | duration_seconds | algorithm_type | algorithm_props | error_message | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ +| ds_0.t_order | true | | false | 100 | 0 | | 2023-09-20 14:45:31.992 | 2023-09-20 14:45:33.519 | 1 | DATA_MATCH | | | ++--------------+--------+---------------------+--------+-------------------------------+-----------------------------+--------------------------+-------------------------+-------------------------+------------------+----------------+-----------------+---------------+ ``` 7. Commit the job. ```sql -COMMIT MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6'; +COMMIT MIGRATION 'j0102p00002333dcb3d9db141cef14bed6fbf1ab54'; ``` Please refer to [RAL#Migration](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#migration) for more details.