This is an automated email from the ASF dual-hosted git repository.
jianglongtao 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 69f282655bb update doc of unregister storage unit DistSQL (#29003)
69f282655bb is described below
commit 69f282655bb4791cef8eeb1df6e545bd95642112
Author: jiangML <[email protected]>
AuthorDate: Fri Nov 10 18:44:20 2023 +0800
update doc of unregister storage unit DistSQL (#29003)
---
.../unregister-storage-unit.cn.md | 27 +++++++++++++++++++---
.../unregister-storage-unit.en.md | 25 ++++++++++++++++----
2 files changed, 45 insertions(+), 7 deletions(-)
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.cn.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.cn.md
index 6b149626e74..cdef6a5b472 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.cn.md
@@ -13,7 +13,16 @@ weight = 3
{{% tab name="语法" %}}
```sql
UnregisterStorageUnit ::=
- 'UNREGISTER' 'STORAGE' 'UNIT' ifExists? storageUnitName (','
storageUnitName)* ('IGNORE' 'SINGLE' 'TABLES')?
+ 'UNREGISTER' 'STORAGE' 'UNIT' ifExists? storageUnitName (','
storageUnitName)* (ignoreSingleTables | ignoreBroadcastTables |
ignoreSingleAndBroadcastTables)?
+
+ignoreSingleTables ::=
+ 'IGNORE' 'SINGLE' 'TABLES'
+
+ignoreBroadcastTables ::=
+ 'IGNORE' 'BROADCAST' 'TABLES'
+
+ignoreSingleAndBroadcastTables ::=
+ 'IGNORE' ('SINGLE' ',' 'BROADCAST' | 'BROADCAST' ',' 'SINGLE') 'TABLES'
ifExists ::=
'IF' 'EXISTS'
@@ -31,7 +40,7 @@ storageUnitName ::=
- `UNREGISTER STORAGE UNIT` 只会移除 Proxy 中的存储单元,不会删除与存储单元对应的真实数据源;
- 无法移除已经被规则使用的存储单元。移除被规则使用的存储单元时会提示 `Storage unit are still in used`;
-- 将要移除的存储单元中仅包含 `SINGLE RULE`,且用户确认可以忽略该限制时,可添加 `IGNORE SINGLE TABLES`
关键字移除存储单元;
+- 将要移除的存储单元中仅包含 `SINGLE RULE`、`BROADCAST RULE`,且用户确认可以忽略该限制时,可添加 `IGNORE
SINGLE TABLES` 、 `IGNORE BROADCAST TABLES` 、 `IGNORE SINGLE, BROADCAST TABLES`
关键字移除存储单元;
- `ifExists` 子句用于避免 `Storage unit not exists` 错误。
### 示例
@@ -54,6 +63,18 @@ UNREGISTER STORAGE UNIT ds_0, ds_1;
UNREGISTER STORAGE UNIT ds_0 IGNORE SINGLE TABLES;
```
+- 忽略广播表移除存储单元
+
+```sql
+UNREGISTER STORAGE UNIT ds_0 IGNORE BROADCAST TABLES;
+```
+
+- 忽略单表和广播表移除存储单元
+
+```sql
+UNREGISTER STORAGE UNIT ds_0 IGNORE SINGLE, BROADCAST TABLES;
+```
+
- 使用 `ifExists` 子句移除存储单元
```sql
@@ -62,7 +83,7 @@ UNREGISTER STORAGE UNIT IF EXISTS ds_0;
### 保留字
-`DROP`、`STORAGE`、`UNIT`、`IF`、`EXISTS`、`IGNORE`、`SINGLE`、`TABLES`
+`DROP`、`STORAGE`、`UNIT`、`IF`、`EXISTS`、`IGNORE`、`SINGLE`、`BROADCAST`、`TABLES`
### 相关链接
diff --git
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.en.md
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.en.md
index 4f84ab968d0..88805066ca8 100644
---
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.en.md
+++
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/storage-unit-definition/unregister-storage-unit.en.md
@@ -13,7 +13,16 @@ The `UNREGISTER STORAGE UNIT` syntax is used to unregister
storage unit from the
{{% tab name="Grammar" %}}
```sql
UnregisterStorageUnit ::=
- 'UNREGISTER' 'STORAGE' 'UNIT' ifExists? storageUnitName (','
storageUnitName)* ('IGNORE' 'SINGLE' 'TABLES')?
+ 'UNREGISTER' 'STORAGE' 'UNIT' ifExists? storageUnitName (','
storageUnitName)* (ignoreSingleTables | ignoreBroadcastTables |
ignoreSingleAndBroadcastTables)?
+
+ignoreSingleTables ::=
+ 'IGNORE' 'SINGLE' 'TABLES'
+
+ignoreBroadcastTables ::=
+ 'IGNORE' 'BROADCAST' 'TABLES'
+
+ignoreSingleAndBroadcastTables ::=
+ 'IGNORE' ('SINGLE' ',' 'BROADCAST' | 'BROADCAST' ',' 'SINGLE') 'TABLES'
ifExists ::=
'IF' 'EXISTS'
@@ -33,8 +42,8 @@ storageUnitName ::=
unregistered;
- Unable to unregister storage unit already used by rules. `Storage unit are
still in used.` will be prompted when removing
storage units used by rules;
-- The storage unit need to be removed only contains `SINGLE RULE`, and when
the user confirms that this restriction
- can be ignored, the `IGNORE SINGLE TABLES` keyword can be added to remove
the storage unit;
+- The storage unit need to be removed only contains `SINGLE RULE`, `BROADCAST
RULE` and when the user confirms that this restriction
+ can be ignored, the `IGNORE SINGLE TABLES`, `IGNORE BROADCAST TABLES`,
`IGNORE SINGLE, BROADCAST TABLES` keyword can be added to remove the storage
unit;
- `ifExists` clause is used for avoid `Storage unit not exists` error.
### Example
@@ -57,6 +66,14 @@ UNREGISTER STORAGE UNIT ds_0, ds_1;
UNREGISTER STORAGE UNIT ds_0 IGNORE SINGLE TABLES;
```
+```sql
+UNREGISTER STORAGE UNIT ds_0 IGNORE BROADCAST TABLES;
+```
+
+```sql
+UNREGISTER STORAGE UNIT ds_0 IGNORE SINGLE, BROADCAST TABLES;
+```
+
- Drop the storage unit with `ifExists` clause
```sql
@@ -65,7 +82,7 @@ UNREGISTER STORAGE UNIT IF EXISTS ds_0;
### Reserved word
-`DROP`, `STORAGE`, `UNIT`, `IF`, `EXISTS`, `IGNORE`, `SINGLE`, `TABLES`
+`DROP`, `STORAGE`, `UNIT`, `IF`, `EXISTS`, `IGNORE`, `SINGLE`, `BROADCAST`,
`TABLES`
### Related links