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/11/22 09:53:19 UTC

[GitHub] [shardingsphere] peilinqian commented on issue #22050: In multi-sharding case,round_robin read_write_split stratages load balance is not based on one logic database

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

   ```
   we find java version: java8, full_version=1.8.0_282, full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
   ShardingSphere-5.2.2-SNAPSHOT
   Commit ID: dirty-753c0cee8ee6fd3db00536da55b64bc5198a3758
   Commit Message: Optimize sqlFederationExecutor init logic when sqlFederationType modify dynamically (#22209)
   Branch: 753c0cee8ee6fd3db00536da55b64bc5198a3758
   Build time: 2022-11-19T10:18:41+0800
   ```
   
   ```
   split_db=> SHOW READWRITE_SPLITTING RULES;
    name | auto_aware_data_source_name | write_data_source_query_enabled | write_storage_unit_name | read_storage_unit_names |   load_balancer_type    | load_balancer_props
   ------+-----------------------------+---------------------------------+-------------------------+-------------------------+-------------------------+---------------------
    ds_0 |                             |                                 | write_0                 | read0_0,read0_1         | TRANSACTION_ROUND_ROBIN |
    ds_1 |                             |                                 | write_1                 | read1_0,read1_1         | TRANSACTION_ROUND_ROBIN |
   (2 rows)
   
   split_db=> preview select * from t_ssdb where id=1 or id =2;
    data_source_name |                actual_sql
   ------------------+------------------------------------------
    read1_1          | select * from t_ssdb where id=1 or id =2
    read0_1          | select * from t_ssdb where id=1 or id =2
   (2 rows)
   
   split_db=> preview select * from t_ssdb where id=1 or id =2;
    data_source_name |                actual_sql
   ------------------+------------------------------------------
    read1_0          | select * from t_ssdb where id=1 or id =2
    read0_0          | select * from t_ssdb where id=1 or id =2
   (2 rows)
   
   split_db=> preview select * from t_ssdb where id=1 or id =2;
    data_source_name |                actual_sql
   ------------------+------------------------------------------
    read1_1          | select * from t_ssdb where id=1 or id =2
    read0_1          | select * from t_ssdb where id=1 or id =2
   (2 rows)
   
   split_db=> preview select * from t_ssdb where id=1 or id =2;
    data_source_name |                actual_sql
   ------------------+------------------------------------------
    read1_0          | select * from t_ssdb where id=1 or id =2
    read0_0          | select * from t_ssdb where id=1 or id =2
   (2 rows)
   
   split_db=> preview select * from t_ssdb where id=1 or id =2;
    data_source_name |                actual_sql
   ------------------+------------------------------------------
    read1_1          | select * from t_ssdb where id=1 or id =2
    read0_1          | select * from t_ssdb where id=1 or id =2
   (2 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