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

   ### Which version of ShardingSphere did you use?
   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.1-SNAPSHOT
   Commit ID: dirty-bcde6f374c4a3a025173fbc9f6d0e66ed686a042
   Commit Message: Fix fetch forward all error in openGauss(#21421) (#21471)
   Branch: bcde6f374c4a3a025173fbc9f6d0e66ed686a042
   Build time: 2022-10-11T19:13:56+0800
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   In multi-sharding case,round_robin stratages load balance is based on one 
logic database
   ### Actual behavior
   In multi-sharding case,round_robin stratages load balance is not based on 
one logic database
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   drop table if exists t_ssdb;
   create table t_ssdb(id int,c_id int,a int,b text);
   insert into t_ssdb values (1,1,10,'test1'),(1,2,10,'test1'),(2,2,20,'test2'),
   (3,3,10,'test3'),(4,4,40,'test4'),(5,5,50,'test5');
   create index idx_rw on t_ssdb(id);
   preview select * from t_ssdb where id=1 or id =2;
   preview select * from t_ssdb where id=1 or id =2;
   preview select * from t_ssdb where id=1 or id =2;
   
   **ps:
   logic database ds_0 ,read0_1 is not load
   logic database ds_1 ,read1_0 is not load**
   
   ```
   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_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_0          | select * from t_ssdb where id=1 or id =2
   (2 rows)
   ```
   
   
   
   ### Example codes for reproduce this issue (such as a github link).
   ```
   schemaName: split_db
   dataSources:
     write_0:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Huawei@123
       url: 
jdbc:opengauss://10.29.180.204:15000/test_db?serverTimezone=UTC&useSSL=false&batchMode=on&LoggerLevel=off
       username: tpccuser
     read0_0:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Huawei@123
       url: 
jdbc:opengauss://10.243.194.134:15000/test_db?serverTimezone=UTC&useSSL=false&batchMode=on&LoggerLevel=off
       username: tpccuser
     read0_1:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Huawei@123
       url: 
jdbc:opengauss://7.212.123.28:15000/test_db?serverTimezone=UTC&useSSL=false&batchMode=on&LoggerLevel=off
       username: tpccuser
     write_1:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Huawei@123
       url: 
jdbc:opengauss://10.29.180.204:16000/test_db?serverTimezone=UTC&useSSL=false&batchMode=on&LoggerLevel=off
       username: tpccuser
     read1_0:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Huawei@123
       url: 
jdbc:opengauss://10.243.194.134:16000/test_db?serverTimezone=UTC&useSSL=false&batchMode=on&LoggerLevel=off
       username: tpccuser
     read1_1:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 260
       minPoolSize: 1
       password: Huawei@123
       url: 
jdbc:opengauss://7.212.123.28:16000/test_db?serverTimezone=UTC&useSSL=false&batchMode=on&LoggerLevel=off
       username: tpccuser
   rules:
   - !SHARDING
     tables:
       t_ssdb:
         actualDataNodes: ds_${0..1}.t_ssdb
         databaseStrategy:
           standard:
             shardingAlgorithmName: ds_database_inline
             shardingColumn: id
     defaultTableStrategy:
       none:
     defaultDatabaseStrategy:
       none:
     shardingAlgorithms:
       ds_database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${id % 2}
           allow-range-query-with-inline-sharding: true
   
   - !READWRITE_SPLITTING
     dataSources:
       ds_0:
         staticStrategy:
           writeDataSourceName: write_0
           readDataSourceNames:
             - read0_0
             - read0_1
         loadBalancerName: roundRobin
       ds_1:
         staticStrategy:
           writeDataSourceName: write_1
           readDataSourceNames:
             - read1_0
             - read1_1
         loadBalancerName: roundRobin
     loadBalancers:
       roundRobin:
         type: TRANSACTION_ROUND_ROBIN
   
   ```


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