Henry2SS commented on a change in pull request #7403:
URL: https://github.com/apache/incubator-doris/pull/7403#discussion_r775039218
##########
File path: docs/zh-CN/administrator-guide/block-rule/sql-block.md
##########
@@ -26,15 +26,23 @@ under the License.
# SQL黑名单
-支持按用户配置SQL黑名单,通过正则匹配的方式拒绝指定SQL。
该功能仅用于限制查询语句,并且不会限制 explain 语句的执行。
+支持按用户配置SQL黑名单:
+
+1. 通过正则匹配的方式拒绝指定SQL
+
+2. 通过设置partitionNum, tabletNum, cardinality, 检查一个查询是否达到其中一个限制
+ - partitionNum, tabletNum, cardinality 可以一起设置,一旦一个查询达到其中一个限制,查询将会被拦截
## 规则
对SQL规则增删改查
- 创建SQL阻止规则
- - sql:匹配规则(基于正则匹配,特殊字符需要转译),可选
- - sqlHash: sql
hash值,用于完全匹配,我们会在`fe.audit.log`打印这个值,可选,这个参数和sql只能二选一,如果给空值,是空字符串不是null
+ - sql:匹配规则(基于正则匹配,特殊字符需要转译),可选,默认值为 "NULL"
+ - sqlHash: sql hash值,用于完全匹配,我们会在`fe.audit.log`打印这个值,可选,这个参数和sql只能二选一,默认值为
"NULL"
+ - partitionNum: 一个扫描节点会扫描的最大partition数量,默认值为0L
+ - tabletNum: 一个扫描节点会扫描的最大扽tablet数量,默认值为0L
Review comment:
Modified.
##########
File path: docs/zh-CN/administrator-guide/block-rule/sql-block.md
##########
@@ -51,15 +59,27 @@ PROPERTIES(
mysql> select * from order_analysis;
ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block
rule: order_analysis_rule
```
+
+```sql
+CREATE SQL_BLOCK_RULE test_rule2 PROPERTIES("partitionNum" = "30",
"cardinality"="10000000000","global"="false","enable"="true")
Review comment:
Added explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]