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 011e12e  Add FAQ for DistSQL DROP RESOURCE #13426 (#13644)
011e12e is described below

commit 011e12e18ed0c02b27ef23f7c46f0a99209446bb
Author: liguoping <[email protected]>
AuthorDate: Wed Nov 17 11:02:04 2021 +0800

    Add FAQ for DistSQL DROP RESOURCE #13426 (#13644)
    
    * FAQ
    
    * ordered and updated FAQ english file
---
 docs/document/content/reference/faq/_index.cn.md | 30 +++++++++++++++++-------
 docs/document/content/reference/faq/_index.en.md | 30 +++++++++++++++++-------
 2 files changed, 42 insertions(+), 18 deletions(-)

diff --git a/docs/document/content/reference/faq/_index.cn.md 
b/docs/document/content/reference/faq/_index.cn.md
index 8fd5976..cac200d 100644
--- a/docs/document/content/reference/faq/_index.cn.md
+++ b/docs/document/content/reference/faq/_index.cn.md
@@ -161,7 +161,19 @@ ShardingSphere 采用 snowflake 算法作为默认的分布式自增主键策略
 2. ShardingSphere预置了必要的连接池参数,如 `maxPoolSize`、`idleTimeout` 等。如需增加或覆盖参数配置,请在 
`dataSource` 中通过 `PROPERTIES` 指定。
 3. 以上规则请参考 
[相关介绍](/cn/user-manual/shardingsphere-proxy/usage/distsql/syntax/rdl/resource-definition/)
 
-## 18. [其他] 如果 SQL 在 ShardingSphere 中执行不正确,该如何调试?
+## 18. [DistSQL] 使用 `DistSQL` 删除资源时,出现 Resource [xxx] is still used by 
[SingleTableRule].
+
+回答:
+
+1. 被规则引用的资源将无法被删除
+
+2. 若资源只被 single table rule 引用,且用户确认可以忽略该限制,则可以添加可选参数 ignore single tables 
进行强制删除
+
+```
+DROP RESOURCE dataSourceName [, dataSourceName] ... [ignore single tables]
+```
+
+## 19. [其他] 如果 SQL 在 ShardingSphere 中执行不正确,该如何调试?
 
 回答:
 
@@ -170,7 +182,7 @@ ShardingSphere 采用 snowflake 算法作为默认的分布式自增主键策略
 
 > 注意:5.x版本以后,`sql.show`参数调整为`sql-show`。
 
-## 19. [其他] 阅读源码时为什么会出现编译错误? IDEA 不索引生成的代码?
+## 20. [其他] 阅读源码时为什么会出现编译错误? IDEA 不索引生成的代码?
 
 回答:
 
@@ -185,7 +197,7 @@ ShardingSphere 使用 lombok 实现极简代码。关于更多使用和安装细
 生成的代码例如 
`org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser` 等 Java 
文件由于较大,默认配置的 IDEA 可能不会索引该文件。
 可以调整 IDEA 的属性:`idea.max.intellisense.filesize=10000`
 
-## 20. [其他] 使用 SQLSever 和 PostgreSQL 时,聚合列不加别名会抛异常?
+## 21. [其他] 使用 SQLSever 和 PostgreSQL 时,聚合列不加别名会抛异常?
 
 回答:
 
@@ -203,7 +215,7 @@ SQLServer获取到的列为空字符串和(2),PostgreSQL获取到的列为空s
 SELECT SUM(num) AS sum_num, SUM(num2) AS sum_num2 FROM tablexxx;
 ```
 
-## 21. [其他] Oracle 数据库使用 Timestamp 类型的 Order By 语句抛出异常提示 “Order by value must 
implements Comparable”?
+## 22. [其他] Oracle 数据库使用 Timestamp 类型的 Order By 语句抛出异常提示 “Order by value must 
implements Comparable”?
 
 回答:
 
@@ -259,7 +271,7 @@ SELECT SUM(num) AS sum_num, SUM(num2) AS sum_num2 FROM 
tablexxx;
     }
 ```
 
-## 22. [其他] Windows 环境下,通过 Git 克隆 ShardingSphere 源码时为什么提示文件名过长,如何解决?
+## 23. [其他] Windows 环境下,通过 Git 克隆 ShardingSphere 源码时为什么提示文件名过长,如何解决?
 
 回答:
 
@@ -280,13 +292,13 @@ git config --global core.longpaths true
 https://docs.microsoft.com/zh-cn/windows/desktop/FileIO/naming-a-file
 
https://ourcodeworld.com/articles/read/109/how-to-solve-filename-too-long-error-in-git-powershell-and-github-application-for-windows
 
-## 23. [其他] Type is required 异常的解决方法?
+## 24. [其他] Type is required 异常的解决方法?
 
 回答:
 
 ShardingSphere 中很多功能实现类的加载方式是通过 [SPI](/cn/concepts/pluggable/) 
注入的方式完成的,如分布式主键,注册中心等;这些功能通过配置中 type 类型来寻找对应的 SPI 实现,因此必须在配置文件中指定类型。
 
-## 24. [其他] 服务启动时如何加快 `metadata` 加载速度?
+## 25. [其他] 服务启动时如何加快 `metadata` 加载速度?
 
 回答:
 
@@ -295,7 +307,7 @@ ShardingSphere 中很多功能实现类的加载方式是通过 [SPI](/cn/concep
 - 配置项`max.connections.size.per.query`(默认值为1)调高(版本 >= 3.0.0.M3 且低于 5.0.0)。
 - 配置项`max-connections-size-per-query`(默认值为1)调高(版本 >= 5.0.0)。
 
-## 25. [其他] ANTLR 插件在 src 同级目录下生成代码,容易误提交,如何避免?
+## 26. [其他] ANTLR 插件在 src 同级目录下生成代码,容易误提交,如何避免?
 
 回答:
 
@@ -303,7 +315,7 @@ ShardingSphere 中很多功能实现类的加载方式是通过 [SPI](/cn/concep
 
 ![Configure ANTLR 
plugin](https://shardingsphere.apache.org/document/current/img/faq/configure-antlr-plugin.png)
 
-## 26. [其他] 使用 `Proxool` 时分库结果不正确?
+## 27. [其他] 使用 `Proxool` 时分库结果不正确?
 
 回答:
 
diff --git a/docs/document/content/reference/faq/_index.en.md 
b/docs/document/content/reference/faq/_index.en.md
index cb714bd..7f43603 100644
--- a/docs/document/content/reference/faq/_index.en.md
+++ b/docs/document/content/reference/faq/_index.en.md
@@ -163,7 +163,19 @@ Answer:
 2. ShardingSphere presets necessary connection pool properties, such as 
`maxPoolSize`, `idleTimeout`, etc. If you need to add or overwrite the 
properties, please specify it with `PROPERTIES` in the `dataSource`.
 3. Please refer to [Related 
introduction](/en/user-manual/shardingsphere-proxy/usage/distsql/syntax/rdl/resource-definition/)
 for above rules.
 
-## 18. [Other] How to debug when SQL can not be executed rightly in 
ShardingSphere?
+## 18. [DistSQL] How to solve ` Resource [xxx] is still used by 
[SingleTableRule].` exception when dropping a data source using DistSQL?
+
+Answer:
+
+1. Resources referenced by rules cannot be deleted
+
+2. If the resource is only referenced by single table rule, and the user 
confirms that the restriction can be ignored, the optional parameter ignore 
single tables can be added to perform forced deletion
+
+```
+DROP RESOURCE dataSourceName [, dataSourceName] ... [ignore single tables]
+```
+
+## 19. [Other] How to debug when SQL can not be executed rightly in 
ShardingSphere?
 
 Answer:
 
@@ -171,7 +183,7 @@ Answer:
 
 A Tip: Property `sql.show` has changed to `sql-show` in version 5.x.
 
-## 19. [Other] Why do some compiling errors appear? Why did not the IDEA index 
the generated codes?
+## 20. [Other] Why do some compiling errors appear? Why did not the IDEA index 
the generated codes?
 
 Answer:
 
@@ -186,7 +198,7 @@ The codes under the package 
`org.apache.shardingsphere.sql.parser.autogen` are g
 The generated codes such as 
`org.apache.shardingsphere.sql.parser.autogen.PostgreSQLStatementParser` may be 
too large to be indexed by the IDEA.
 You may configure the IDEA's property `idea.max.intellisense.filesize=10000`.
 
-## 20. [Other] In SQLSever and PostgreSQL, why does the aggregation column 
without alias throw exception?
+## 21. [Other] In SQLSever and PostgreSQL, why does the aggregation column 
without alias throw exception?
 
 Answer:
 
@@ -204,7 +216,7 @@ The right SQL should be written as:
 SELECT SUM(num) AS sum_num, SUM(num2) AS sum_num2 FROM tablexxx;
 ```
 
-## 21. [Other] Why does Oracle database throw “Order by value must implements 
Comparable” exception when using Timestamp Order By?
+## 22. [Other] Why does Oracle database throw “Order by value must implements 
Comparable” exception when using Timestamp Order By?
 
 Answer:
 
@@ -257,7 +269,7 @@ After using resultSet.getObject(int index), for TimeStamp 
oracle, the system wil
     }
 ```
 
-## 22. [Other] In Windows environment,when cloning ShardingSphere source code 
through Git, why prompt filename too long and how to solve it?
+## 23. [Other] In Windows environment,when cloning ShardingSphere source code 
through Git, why prompt filename too long and how to solve it?
 
 Answer:
 
@@ -281,13 +293,13 @@ Reference material:
 https://docs.microsoft.com/zh-cn/windows/desktop/FileIO/naming-a-file
 
https://ourcodeworld.com/articles/read/109/how-to-solve-filename-too-long-error-in-git-powershell-and-github-application-for-windows
 
-## 23. [Other] How to solve `Type is required` error?
+## 24. [Other] How to solve `Type is required` error?
 
 Answer:
 
 In Apache ShardingSphere, many functionality implementation are uploaded 
through [SPI](/en/concepts/pluggable/), such as Distributed Primary Key. These 
functions load SPI implementation by configuring the `type`,so the `type` must 
be specified in the configuration file.
 
-## 24. [Other] How to speed up the metadata loading when service starts up?
+## 25. [Other] How to speed up the metadata loading when service starts up?
 
 Answer:
 
@@ -296,7 +308,7 @@ Answer:
 - `max.connections.size.per.query`(Default value is 1) higher referring to 
connection pool you adopt(Version >= 3.0.0.M3 & Version < 5.0.0).
 - `max-connections-size-per-query`(Default value is 1) higher referring to 
connection pool you adopt(Version >= 5.0.0).
 
-## 25. [Other] The ANTLR plugin generates codes in the same level directory as 
src, which is easy to commit by mistake. How to avoid it?
+## 26. [Other] The ANTLR plugin generates codes in the same level directory as 
src, which is easy to commit by mistake. How to avoid it?
 
 Answer:
 
@@ -304,7 +316,7 @@ Goto [Settings -> Languages & Frameworks -> ANTLR v4 
default project settings](j
 
 ![Configure ANTLR 
plugin](https://shardingsphere.apache.org/document/current/img/faq/configure-antlr-plugin.png)
 
-## 26. [Other] Why is the database sharding result not correct when using 
`Proxool`?
+## 27. [Other] Why is the database sharding result not correct when using 
`Proxool`?
 
 Answer:
 

Reply via email to