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 07:26:48 UTC

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

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



##########
File path: docs/document/content/features/dist-sql/syntax/rdl/rdl-shadow-rule.en.md
##########
@@ -0,0 +1,65 @@
++++
+title = "影子库压测"
+weight = 6
++++
+
+## Definition
+
+```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
+```
+
+- `Shadow` please refer to [Shadow](https://shardingsphere.apache.org/document/current/cn/features/shadow/)
+- `ruleName` Duplicate name cannot be created
+- `resourceMapping` specifies the mapping relationship between the source database and the shadow library. You need to use the `Resource` resource managed by RDL, please refer to [Resources](https:shardingsphere.apache.orgdocumentcurrentcnfeaturesdist-sqlsyntaxrdlrdl-resource)
+- `shadowAlgorithm` can act on multiple `shadowTableRule` at the same time
+- If `algorithmName` is not filled in, it will be automatically generated according to `ruleName`, `tableName` and `shadowAlgorithmType` (recommended database naming convention)
+- `TYPE` currently supports `COLUMN_REGEX_MATCH` and `SIMPLE_NOTE`

Review comment:
       All have been fixed




-- 
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