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

   version of shardingsphere-proxy: 5.2.0
   
   
   ### TEST
   1. add resource
   ```
   ALTER RESOURCE ds_10_216_91_118_3309 (
   HOST="10.216.91.118",
   PORT=3309,
   DB="jz_ds_0",
   USER="dba",
   PASSWORD="123456",
   
PROPERTIES("maximumPoolSize"="10","idleTimeout"="30000","initializationFailTimeout"="1","validationTimeout"="5000","connectionTimeout"="30000")
   ),ds_10_216_91_119_3309 (
   HOST="10.216.91.119",
   PORT=3309,
   DB="jz_ds_0",
   USER="dba",
   PASSWORD="123456"
   ),ds_10_216_91_120_3309 (
   HOST="10.216.91.120",
   PORT=3309,
   DB="jz_ds_0",
   USER="dba",
   PASSWORD="123456"
   );
   ```
   2. config readwrite rule
   ```
   CREATE READWRITE_SPLITTING RULE my_group_3309 (
   WRITE_RESOURCE=ds_10_216_91_118_3309,
   READ_RESOURCES(ds_10_216_91_119_3309,ds_10_216_91_120_3309),
   TYPE(NAME="random")
   );
   ```
   ```
   mysql> SHOW READWRITE_SPLITTING RULES \G
   *************************** 1. row ***************************
                              name: my_group_3309
       auto_aware_data_source_name: 
   write_data_source_query_enabled: 
            write_data_source_name: ds_10_216_91_118_3309
            read_data_source_names: ds_10_216_91_119_3309,ds_10_216_91_120_3309
                load_balancer_type: random
               load_balancer_props: 
   1 row in set (0.00 sec)
   ```
   
   3. check MySQL status
   
![image](https://user-images.githubusercontent.com/21055334/194701792-5b287616-690a-4628-948a-dc8a859419cf.png)
   
   4. shutdown mysql slave
   
![image](https://user-images.githubusercontent.com/21055334/194701617-d61d8a46-1856-450d-a089-5e1726cc2ba3.png)
   
   
   5. Distsql -atlter 
   
![image](https://user-images.githubusercontent.com/21055334/194701755-51804df3-c21f-4d5e-b0fa-1c819801f5f7.png)
   
   
   or
   
![image](https://user-images.githubusercontent.com/21055334/194701771-8d406229-c0c4-4ff8-9e31-547d78ddb556.png)
   
   at this moment ,throw an error


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

Reply via email to