You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/12/30 08:37:18 UTC
[shardingsphere] branch master updated: Update scaling overview picture and improve scaling usage doc (#14437)
This is an automated email from the ASF dual-hosted git repository.
menghaoran 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 7a3dcc7 Update scaling overview picture and improve scaling usage doc (#14437)
7a3dcc7 is described below
commit 7a3dcc73df253430b559850b82717f16178bb61a
Author: Hongsheng Zhong <sa...@126.com>
AuthorDate: Thu Dec 30 16:36:10 2021 +0800
Update scaling overview picture and improve scaling usage doc (#14437)
* Update scaling overview picture
* Update scaling usage doc
---
.../user-manual/shardingsphere-scaling/usage.cn.md | 4 +++-
.../user-manual/shardingsphere-scaling/usage.en.md | 4 +++-
docs/document/static/img/scaling/overview.cn.png | Bin 323349 -> 234664 bytes
docs/document/static/img/scaling/overview.en.png | Bin 322465 -> 233447 bytes
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md b/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
index b1726df..906a115 100644
--- a/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-scaling/usage.cn.md
@@ -153,7 +153,7 @@ ADD RESOURCE ds_2 (
);
```
-2. 修改分片规则
+2. 修改所有表的分片规则
目前只有通过执行 `ALTER SHARDING TABLE RULE` DistSQL 来触发迁移。
@@ -200,6 +200,8 @@ GENERATED_KEY(COLUMN=order_item_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=12
`database_inline` 的 `algorithm-expression` 从 `ds_${user_id % 2}` 改为 `ds_${user_id % 3 + 2}`,`t_order` 的 `DATANODES` 从 `ds_${0..1}.t_order_${0..1}` 改为 `ds_${2..4}.t_order_${0..1}`,会触发迁移。
+目前 `ALTER SHARDING ALGORITHM` 会即时生效、但是规则还没生效,可能会导致源端 insert 异常,所以建议优先修改为 `AutoTableRule`。
+
#### 查询所有迁移任务
详情请参见[RAL#弹性伸缩](/cn/user-manual/shardingsphere-proxy/distsql/syntax/ral/#%E5%BC%B9%E6%80%A7%E4%BC%B8%E7%BC%A9)。
diff --git a/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md b/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
index 0bc328b..18e7175 100644
--- a/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
+++ b/docs/document/content/user-manual/shardingsphere-scaling/usage.en.md
@@ -155,7 +155,7 @@ ADD RESOURCE ds_2 (
);
```
-2. Alter sharding table rule
+2. Alter all sharding table rule
Currently, scaling job could only be emitted by executing `ALTER SHARDING TABLE RULE` DistSQL.
@@ -202,6 +202,8 @@ GENERATED_KEY(COLUMN=order_item_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=12
`algorithm-expression` of `database_inline` is alerted from `ds_${user_id % 2}` to `ds_${user_id % 3 + 2}`, and `DATANODES` of `t_order` is alerted from `ds_${0..1}.t_order_${0..1}` to `ds_${2..4}.t_order_${0..1}`, it will emit scaling job.
+Currently, `ALTER SHARDING ALGORITHM` will take effect immediately, but table rule will not, it might cause inserting data into source side failure, so alter sharding table rule to `AutoTableRule` is recommended for now.
+
#### List scaling jobs
Please refer to [RAL#Scaling](/en/user-manual/shardingsphere-proxy/distsql/syntax/ral/#scaling) for more details.
diff --git a/docs/document/static/img/scaling/overview.cn.png b/docs/document/static/img/scaling/overview.cn.png
index 091e7de..4bd7611 100644
Binary files a/docs/document/static/img/scaling/overview.cn.png and b/docs/document/static/img/scaling/overview.cn.png differ
diff --git a/docs/document/static/img/scaling/overview.en.png b/docs/document/static/img/scaling/overview.en.png
index 8afa161..3edc725 100644
Binary files a/docs/document/static/img/scaling/overview.en.png and b/docs/document/static/img/scaling/overview.en.png differ