文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
影子库压测
定义
SHOW SHADOW shadowRule | RULES [FROM schemaName]
SHOW SHADOW TABLE RULES [FROM schemaName]
SHOW SHADOW ALGORITHMS [FROM schemaName]
shadowRule:
RULE ruleName
- 支持查询所有影子规则和指定表查询
- 支持查询所有表规则
- 支持查询所有影子算法
说明
Shadow Rule
列 | 说明 |
---|---|
rule_name | 规则名称 |
source_name | 源数据库 |
shadow_name | 影子数据库 |
shadow_table | 影子表 |
Shadow Table Rule
列 | 说明 |
---|---|
shadow_table | 影子表 |
shadow_algorithm_name | 影子算法名称 |
Shadow Algorithms
列 | 说明 |
---|---|
shadow_algorithm_name | 影子算法名称 |
type | 算法类型 |
props | 算法参数 |
示例
SHOW SHADOW RULES
mysql> show shadow rules;
+--------------------+-------------+-------------+--------------+
| rule_name | source_name | shadow_name | shadow_table |
+--------------------+-------------+-------------+--------------+
| shadow_rule_1 | ds_1 | ds_shadow_1 | t_order |
| shadow_rule_2 | ds_2 | ds_shadow_2 | t_order_item |
+--------------------+-------------+-------------+--------------+
2 rows in set (0.02 sec)
SHOW SHADOW RULE ruleName
mysql> show shadow rule shadow_rule_1;
+------------------+-------------+-------------+--------------+
| rule_name | source_name | shadow_name | shadow_table |
+------------------+-------------+-------------+--------------+
| shadow_rule_1 | ds_1 | ds_shadow_1 | t_order |
+------------------+-------------+-------------+--------------+
1 rows in set (0.01 sec)
SHOW SHADOW TABLE RULES
mysql> show shadow table rules;
+--------------+--------------------------------------------------------------------------------+
| shadow_table | shadow_algorithm_name |
+--------------+--------------------------------------------------------------------------------+
| t_order_1 | user_id_match_algorithm,simple_note_algorithm_1 |
+--------------+--------------------------------------------------------------------------------+
1 rows in set (0.01 sec)
SHOW SHADOW ALGORITHMS
mysql> show shadow algorithms;
+-------------------------+--------------------+-------------------------------------------+
| shadow_algorithm_name | type | props |
+-------------------------+--------------------+-------------------------------------------+
| user_id_match_algorithm | COLUMN_REGEX_MATCH | operation=insert,column=user_id,regex=[1] |
| simple_note_algorithm_1 | SIMPLE_NOTE | shadow=true,foo=bar |
+-------------------------+--------------------+-------------------------------------------+
2 rows in set (0.01 sec)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论