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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - e6ed6928d802fda145e4870ca565672e8103f0fe
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   `transactionalReadQueryStrategy` was properly set in generated DistSQL.
   
   ### Actual behavior
   
   Executing DistSQL
   ```
   CONVERT YAML CONFIGURATION FROM FILE '/path/to/config-rw.yaml'
   ```
   
   `transactionalReadQueryStrategy` disappeared, which caused incorrect routing 
result in transaction.
   ```
   CREATE READWRITE_SPLITTING RULE ds_0 (
   WRITE_STORAGE_UNIT=w0,
   READ_STORAGE_UNITS(r0_0,r0_1),
   TYPE(NAME='random')
   ), ds_1 (
   WRITE_STORAGE_UNIT=w1,
   READ_STORAGE_UNITS(r1_0,r1_1),
   TYPE(NAME='random')
   ), ds_2 (
   WRITE_STORAGE_UNIT=w2,
   READ_STORAGE_UNITS(r2_0,r2_1),
   TYPE(NAME='random')
   ), ds_3 (
   WRITE_STORAGE_UNIT=w3,
   READ_STORAGE_UNITS(r3_0,r3_1),
   TYPE(NAME='random')
   );
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   
   
   ```yaml
   databaseName: sbtest
   
   dataSources:
     w0:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_0_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r0_0:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_0_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r0_1:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_0_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
       
     w1:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_1_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r1_0:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_1_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r1_1:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_1_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
       
     w2:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_2_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r2_0:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_2_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r2_1:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_2_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
       
     w3:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_3_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r3_0:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_3_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
     r3_1:
       url: 
jdbc:mysql://127.0.0.1:3306/sbtest_3_sharding_rw?useSSL=false&prepStmtCacheSize=8192&tcpRcvBuf=8192
       username: root
       password: root
       connectionTimeoutMilliseconds: 3000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 32
       minPoolSize: 0
   
   rules:
     - !READWRITE_SPLITTING
       dataSources:
         ds_0:
           transactionalReadQueryStrategy: PRIMARY
           writeDataSourceName: w0
           readDataSourceNames:
             - r0_0
             - r0_1
           loadBalancerName: random
         ds_1:
           transactionalReadQueryStrategy: PRIMARY
           writeDataSourceName: w1
           readDataSourceNames:
             - r1_0
             - r1_1
           loadBalancerName: random
         ds_2:
           transactionalReadQueryStrategy: PRIMARY
           writeDataSourceName: w2
           readDataSourceNames:
             - r2_0
             - r2_1
           loadBalancerName: random
         ds_3:
           transactionalReadQueryStrategy: PRIMARY
           writeDataSourceName: w3
           readDataSourceNames:
             - r3_0
             - r3_1
           loadBalancerName: random
       loadBalancers:
         random:
           type: RANDOM
   ```


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