yc-22 edited a comment on issue #11892:
URL: 
https://github.com/apache/shardingsphere/issues/11892#issuecomment-901660078


   > Hi @yc-22 I did not get you. Could you provide your configuration to let 
me which feature you want to use? Readwrite-splitting or sharding?
   
   Sharding. I want to shard 4 data sources for both read and write operation. 
For now, if I drop one shard, the write db operation would completely fail. 
(Even if the data is supposed to be written into healthy shard) But the read 
operation can still perform well. So is there some setting I can configure to 
make write db operation still perform in this scenario or this is a bug?
   Configure
   ```
   # Configure actual data sources
   spring.shardingsphere.datasource.names: D0, D1, D2, D3
   
   # Configure the first data source
   spring.shardingsphere.datasource.D0.type: com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.D0.driver-class-name: com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.D0.jdbc-url: 
jdbc:mysql://db:3306/D0?useUnicode=yes&characterEncoding=utf8
   spring.shardingsphere.datasource.D0.username: XXX
   spring.shardingsphere.datasource.D0.password: XXX
   
   # Configure the second data source
   spring.shardingsphere.datasource.D1.type: com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.D1.driver-class-name: com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.D1.jdbc-url: 
jdbc:mysql://db:3306/D1?useUnicode=yes&characterEncoding=utf8
   spring.shardingsphere.datasource.D1.username: XXX
   spring.shardingsphere.datasource.D1.password: XXX
   
   # Configure the third data source
   spring.shardingsphere.datasource.D2.type: com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.D2.driver-class-name: com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.D2.jdbc-url: 
jdbc:mysql://db:3306/D2?useUnicode=yes&characterEncoding=utf8
   spring.shardingsphere.datasource.D2.username: XXX
   spring.shardingsphere.datasource.D2.password: XXX
   
   # Configure the fourth data source
   spring.shardingsphere.datasource.D3.type: com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.D3.driver-class-name: com.mysql.jdbc.Driver
   spring.shardingsphere.datasource.D3.jdbc-url: 
jdbc:mysql://db:3306/D3?useUnicode=yes&characterEncoding=utf8
   spring.shardingsphere.datasource.D3.username: XXX
   spring.shardingsphere.datasource.D3.password: XXX
   
   # Configure table rule
   spring.shardingsphere.rules.sharding.tables.Table.actual-data-nodes: 
D$->{0..3}.Table
   
   # Configure database sharding strategy
   
spring.shardingsphere.rules.sharding.tables.Table.database-strategy.standard.sharding-column:
 XXX
   
spring.shardingsphere.rules.sharding.tables.Table.database-strategy.standard.sharding-algorithm-name:
 database-strategy
   
spring.shardingsphere.rules.sharding.sharding-algorithms.database-strategy.type:
 XXXXX
   
spring.shardingsphere.rules.sharding.sharding-algorithms.database-strategy.props.algorithm-class-name:
 XX.XX.XXXX
   ```


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