You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/24 02:57:12 UTC

[GitHub] [shardingsphere] RaigorJiang commented on a change in pull request #12629: Shadow DistSQL doc

RaigorJiang commented on a change in pull request #12629:
URL: https://github.com/apache/shardingsphere/pull/12629#discussion_r715284052



##########
File path: docs/document/content/features/dist-sql/syntax/rdl/rdl-shadow-rule.cn.md
##########
@@ -0,0 +1,65 @@
++++
+title = "影子库压测"
+weight = 6
++++
+
+## 定义
+
+```sql
+CREATE SHADOW RULE shadowRuleDefinition [, shadowRuleDefinition] ... 
+
+ALTER SHADOW RULE shadowRuleDefinition [, shadowRuleDefinition] ... 
+
+ALTER SHADOW ALGORITHM shadowAlgorithm [, shadowAlgorithm] ...
+
+DROP SHADOW RULE ruleName [, ruleName] ...
+
+DROP SHADOW ALGORITHM algorithmName [, algorithmName] ...
+
+shadowRuleDefinition: ruleName(resourceMapping, shadowTableRule [, shadowTableRule] ...)
+
+resourceMapping: SOURCE=resourceName, SHADOW=resourceName
+
+shadowTableRule: tableName(shadowAlgorithm [, shadowAlgorithm] ...)
+
+shadowAlgorithm: ([algorithmName, ] TYPE(NAME=shadowAlgorithmType, PROPERTIES([algorithmProperties] ...)))
+
+algorithmProperties: algorithmProperty [, algorithmProperty] ... 
+
+algorithmProperty: key=value
+```
+
+- 影子库压测请参考 [影子库压测](https://shardingsphere.apache.org/document/current/cn/features/shadow/)
+- `ruleName` 重复的名称无法被创建
+- `resourceMapping` 指定源数据库和影子库的映射关系,需使用 RDL 管理的`Resource`资源,请参考 [数据源资源](https://shardingsphere.apache.org/document/current/cn/features/dist-sql/syntax/rdl/rdl-resource/)
+- `shadowAlgorithm` 可同时作用于多个 `shadowTableRule`
+- `algorithmName`  未填写时会根据 `ruleName`、`tableName` 和 `shadowAlgorithmType` 自动生成(推荐数据库命名规范)

Review comment:
       SQL statement is not a form, it is not suitable to use `填写`, `指定` may be better.




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org