JoshuaChen commented on issue #34387:
URL: 
https://github.com/apache/shardingsphere/issues/34387#issuecomment-2599768525

   I updated my PR and added unit tests to try to explain my changes.
   
   I found that BroadcastRoute also does not support it.
   So now it can become:
   
   ```
   dataSources:
     mydatabase_write_ds:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       url: jdbc:postgresql://127.0.0.1:5432/mydatabase
       username: myuser
       password: secret
     mydatabase_read_ds_0:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       url: jdbc:postgresql://127.0.0.1:5432/mydatabase
       username: myuser
       password: secret
       readOnly: true
     mydatabase_read_ds_1:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       url: jdbc:postgresql://127.0.0.1:5432/mydatabase
       username: myuser
       password: secret
       readOnly: true
     mydatabase2_write_ds:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       url: jdbc:postgresql://127.0.0.1:5432/mydatabase2
       username: myuser
       password: secret
     mydatabase2_read_ds_0:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       url: jdbc:postgresql://127.0.0.1:5432/mydatabase2
       username: myuser
       password: secret
       readOnly: true
   
   rules:
     - !READWRITE_SPLITTING
       dataSourceGroups:
         "dsg_1":
           writeDataSourceName: mydatabase_write_ds
           readDataSourceNames:
             - mydatabase_read_ds_0
             - mydatabase_read_ds_1
           transactionalReadQueryStrategy: PRIMARY
           loadBalancerName: baseAA
       loadBalancers:
         baseAA:
           type: ROUND_ROBIN
         "dsg_1":
           writeDataSourceName: mydatabase2_write_ds
           readDataSourceNames:
             - mydatabase2_read_ds_0
           transactionalReadQueryStrategy: PRIMARY
           loadBalancerName: baseAA
       loadBalancers:
         baseAA:
           type: ROUND_ROBIN
   
   - !BROADCAST
     tables:
       - t_address
   
   props:
     sql-show: false
   
   ```
   
   If I'm wrong, please correct me..


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