You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhaojinchao95 (via GitHub)" <gi...@apache.org> on 2023/05/18 03:09:47 UTC

[GitHub] [shardingsphere] zhaojinchao95 opened a new issue, #25753: Consider adjustment storage_nodes node of governance center.

zhaojinchao95 opened a new issue, #25753:
URL: https://github.com/apache/shardingsphere/issues/25753

   Hi community,
   
    Currently, `storage_nodes` children nodes are `${databaseName}.${groupName}.${dataSourceName}`, i think we should change to `${databaseName}.${dataSourceName}`. Because it has checker when we create `readwrite_splitting` rules, It' s throw some exception if the same `dataSourceName` name is referenced in both `readwrite-splitting` rules.
   
   ```
   mysql> create database test;
   Query OK, 0 rows affected (0.03 sec)
   
   mysql> use test;
   Database changed
   mysql>     REGISTER STORAGE UNIT ds_0 (
       ->         HOST="xxxxxxxx",
       ->         PORT=33308,
       ->         DB="test",
       ->         USER="root",
       ->         PASSWORD="xxxxx"
       ->     );
   Query OK, 0 rows affected (3.17 sec)
   
   mysql>     REGISTER STORAGE UNIT ds_1 (
       ->         HOST="xxxxxxx",
       ->         PORT=33307,
       ->         DB="test",
       ->         USER="root",
       ->         PASSWORD="xxxxxxx"
       ->     );
   
   Query OK, 0 rows affected (2.99 sec)
   
   mysql> 
   mysql> CREATE READWRITE_SPLITTING RULE group_name1 (
       -> WRITE_STORAGE_UNIT=ds_0,
       -> READ_STORAGE_UNITS(ds_1),
       -> TYPE(NAME="random")
       -> );
   Query OK, 0 rows affected (44.55 sec)
   
   mysql> CREATE READWRITE_SPLITTING RULE group_name2 (
       -> WRITE_STORAGE_UNIT=ds_0,
       -> READ_STORAGE_UNITS(ds_1),
       -> TYPE(NAME="random")
       -> );
   ERROR 19100 (44000): Invalid `Readwrite-splitting` rule `group_name2`, error message is: Can not config duplicate write storage unit `ds_0` in database `test`
   ```
   


-- 
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.apache.org

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