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

   ## Question
   
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   
   my springboot config :
   
   spring:
     shardingsphere:
       datasource:
         names: write-common, write-common-read-0, write-common-read-1, 
write-run-0, write-run-0-read-0, write-run-0-read-1, write-run-1, 
write-run-1-read-0, write-run-1-read-1, ds-history-0,ds-history-1
         write-common:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.136:3310/fpc_ec_m?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true
           username: root
           password: 123456
           max-active: 16
         write-common-read-0:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           url: 
jdbc:mysql:192.168.0.135:3311/fpc_ec_m?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true
           username: root
           password: 123456
           max-active: 16
         write-common-read-1:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           url: 
jdbc:mysql:192.168.0.135:3312/fpc_ec_m?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true
           username: root
           password: 123456
           max-active: 16
         write-run-0:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.136:3410/fpc_er_m_0?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
           username: root
           password: 123456
           max-active: 16
         write-run-0-read-0:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.135:3411/fpc_er_m_0?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true
           username: root
           password: 123456
           max-active: 16
         write-run-0-read-1:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.135:3412/fpc_er_m_0?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true
           username: root
           password: 123456
           max-active: 16
         write-run-1:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.136:3510/fpc_er_m_1?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
           username: root
           password: 123456
           max-active: 16
         write-run-1-read-0:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.135:3511/fpc_er_m_1?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true
           username: root
           password: 123456
           max-active: 16
         write-run-1-read-1:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.135:3512/fpc_er_m_1?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true&autoReconnect=true
           username: root
           password: 123456
           max-active: 16
         ds-history-0:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.136:3610/fpc_eh_m_0?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true
           username: root
           password: 123456
           max-active: 16
         ds-history-1:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           url: 
jdbc:mysql:192.168.0.136:3710/fpc_eh_m_1?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true
           username: root
           password: 123456
           max-active: 16
       rules:
         readwrite-splitting:
           data-sources:
             ds-common:
               props:
                 read-data-source-names: write-common-read-0, 
write-common-read-1
                 write-data-source-name: write-common
               type: Static
             ds-run-0:
               props:
                 read-data-source-names: write-run-0-read-0, write-run-0-read-1
                 write-data-source-name: write-run-0
               type: Static
             ds-run-1:
               props:
                 read-data-source-names: write-run-1-read-0, write-run-1-read-1
                 write-data-source-name: write-run-1
               type: Static
           load-balancers:
             round_robin:
               type: ROUND_ROBIN
         encrypt:
           tables:
             t_user:
               columns:
                 phone:
                   cipher-column: phone
                   encryptor-name: common-encryptor
             t_student:
               columns:
                 id_card:
                   cipher-column: id_card
                   encryptor-name: common-encryptor
             t_school:
               columns:
                 school_code:
                   cipher-column: school_code
                   encryptor-name: common-encryptor
         sharding:
           sharding-algorithms:
             database-run-inline:
               props:
                 algorithm-expression: ds-run-$->{db_location}
               type: INLINE
             database-history-inline:
               props:
                 algorithm-expression: ds-history-$->{db_location}
               type: INLINE
             common-log-table-inline:
               props:
                 algorithm-expression: t_log_$->{id % 9}
               type: INLINE
             student-item-result-table-inline:
               props:
                 algorithm-expression: t_student_item_result_$->{table_location}
               type: INLINE
             student-item-result-history-table-inline:
               props:
                 algorithm-expression: 
t_student_item_result_history_$->{table_location}
               type: INLINE
           tables:
             t_log:
               actual-data-nodes: ds-common.t_log_$->{0..8}
               table-strategy:
                 standard:
                   sharding-column: id
                   sharding-algorithm-name: common-log-table-inline
             t_user:
               actual-data-nodes: ds-common.t_user
             t_student_item_result:
               actual-data-nodes: 
ds-run-$->{0..1}.t_student_item_result_$->{0..9}
               database-strategy:
                 standard:
                   sharding-column: db_location
                   sharding-algorithm-name: database-run-inline
               table-strategy:
                 standard:
                   sharding-column: table_location
                   sharding-algorithm-name: student-item-result-table-inline
             t_school:
               actual-data-nodes: ds-run-$->{0..1}.t_school
               database-strategy:
                 standard:
                   sharding-column: db_location
                   sharding-algorithm-name: database-run-inline
             t_student:
               actual-data-nodes: ds-run-$->{0..1}.t_student
               database-strategy:
                 standard:
                   sharding-column: db_location
                   sharding-algorithm-name: database-run-inline
             t_student_item_result_history:
               actual-data-nodes: 
ds-history-$->{0..1}.t_student_item_result_history_$->{0..9}
               database-strategy:
                 standard:
                   sharding-column: db_location
                   sharding-algorithm-name: database-history-inline
               table-strategy:
                 standard:
                   sharding-column: table_location
                   sharding-algorithm-name: 
student-item-result-history-table-inline
         
   run log:
   
   
![image](https://user-images.githubusercontent.com/10510950/234825308-2c374cd6-de7c-49e1-9dbb-3ef18e1aeb02.png)
   
   
   log mean:  read write is not working, it is only work on write db, select is 
not on slave;
   
   my sharding version: 5.1.2


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