RaigorJiang commented on a change in pull request #12629: URL: https://github.com/apache/shardingsphere/pull/12629#discussion_r715285399
########## 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` 自动生成(推荐数据库命名规范) +- `TYPE` 目前支持 `COLUMN_REGEX_MATCH` 和 `SIMPLE_NOTE` Review comment: `shadowAlgorithmType` 目前支持 `COLUMN_REGEX_MATCH` 和 `SIMPLE_NOTE` -- 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]
