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 2022/09/16 10:35:21 UTC

[GitHub] [shardingsphere] peilinqian commented on issue #19102: Maybe we can verify dataSource in ReadWrite-splitting rules,before create ReadWrite-splitting rules.

peilinqian commented on issue #19102:
URL: https://github.com/apache/shardingsphere/issues/19102#issuecomment-1249206246

   ```
   split_db=> CREATE READWRITE_SPLITTING RULE ms_group_0 (
   split_db(> WRITE_RESOURCE=write_0,
   split_db(> READ_RESOURCES(read1_0),
   split_db(> TYPE(NAME="random")
   split_db(> );
   ERROR:  Can not config duplicate write data source `write_0` in database `split_db`.
   split_db=> CREATE READWRITE_SPLITTING RULE ms_group_1(
   split_db(> WRITE_RESOURCE=write_0,
   split_db(> READ_RESOURCES(read1_0),
   split_db(> TYPE(NAME="random")
   split_db(> );
   ERROR:  Can not config duplicate write data source `write_0` in database `split_db`.
   split_db=>
   split_db=> SHOW READWRITE_SPLITTING RULES;
       name    | auto_aware_data_source_name | write_data_source_query_enabled | write_data_source_name | read_data_source_names |   load_balancer_type    | load_balancer_props
   ------------+-----------------------------+---------------------------------+------------------------+------------------------+-------------------------+---------------------
    ds_0       |                             |                                 | write_0                | read0_0                | TRANSACTION_ROUND_ROBIN |
    ds_1       |                             |                                 | write_1                | read1_0                | TRANSACTION_ROUND_ROBIN |
    ms_group_0 |                             |                                 | write_0                | read1_0                | random                  |
    ms_group_1 |                             |                                 | write_0                | read1_0                | random                  |
   (4 rows)
   
   ```


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