You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "janlee151 (via GitHub)" <gi...@apache.org> on 2024/09/07 18:25:08 UTC

[I] readwrite-splitting-problem [shardingsphere]

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

   ## Question
   
   shardingsphere-jdbc-core-spring-boot-starter
   version: 5.2.0
   readwrite-splitting
   here is my springboot yaml config:
   
   
   datasources config:
   shardingsphere:
       datasource: 
         names: ds1,ds2,ds3
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://localhost:3306/master?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
           username: root
           password:xxxxxxx
           initial-size: 1
           max-active: 20
           max-open-prepared-statements: 20
           max-pool-prepared-statement-per-connection-size: 50
           max-wait: 60000
           min-evictable-idle-time-millis: 300000
           min-idle: 1
           pool-prepared-statements: true
           test-on-borrow: false
           test-on-return: false
           test-while-idle: true
           time-between-eviction-runs-millis: 60000
           validation-query: slect 1 from dual
           keep-alive: true
         ds2:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://localhost:3306/slave1?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
           username: root
           password:xxxxxxx
           initial-size: 1
           max-active: 20
           max-open-prepared-statements: 20
           max-pool-prepared-statement-per-connection-size: 50
           max-wait: 60000
           min-evictable-idle-time-millis: 300000
           min-idle: 1
           pool-prepared-statements: true
           test-on-borrow: false
           test-on-return: false
           test-while-idle: true
           time-between-eviction-runs-millis: 60000
           validation-query: slect 1 from dual
           keep-alive: true
         ds3:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://localhost:3306/slave2?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
           username: root
           password: xxxxxxx
           initial-size: 1
           max-active: 20
           max-open-prepared-statements: 20
           max-pool-prepared-statement-per-connection-size: 50
           max-wait: 60000
           min-evictable-idle-time-millis: 300000
           min-idle: 1
           pool-prepared-statements: true
           test-on-borrow: false
           test-on-return: false
           test-while-idle: true
           time-between-eviction-runs-millis: 60000
           validation-query: slect 1 from dual
           keep-alive: true
   
   readwrite-splitting config:
   ![image](https://github.com/user-attachments/assets/bd52a524-a637-492b-909d-66dc22ad32ed)
   
   problem:
   master database has data:
   ![image](https://github.com/user-attachments/assets/7be99472-b5e9-437d-beb4-03968899577a)
   slave database has no data
   ![image](https://github.com/user-attachments/assets/536ca20a-f13b-45a9-a8e8-3d3d4f656caa)
   why?
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] readwrite-splitting-problem [shardingsphere]

Posted by "lazyboyl (via GitHub)" <gi...@apache.org>.
lazyboyl commented on issue #32804:
URL: https://github.com/apache/shardingsphere/issues/32804#issuecomment-2359891532

   Master-slave data synchronization is achieved through MySQL's master-slave mechanism, and you need to configure the master-slave settings for MySQL yourself.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] readwrite-splitting-problem [shardingsphere]

Posted by "janlee151 (via GitHub)" <gi...@apache.org>.
janlee151 commented on issue #32804:
URL: https://github.com/apache/shardingsphere/issues/32804#issuecomment-2340007279

   @terrymanu hello,help me solve this problem,thank you


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] readwrite-splitting-problem [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #32804:
URL: https://github.com/apache/shardingsphere/issues/32804#issuecomment-2379973929

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] readwrite-splitting-problem [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #32804:
URL: https://github.com/apache/shardingsphere/issues/32804#issuecomment-2336525431

   The markdown format in your issue is incorrect. To facilitate reading, could you please revise it?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] readwrite-splitting-problem [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #32804: readwrite-splitting-problem
URL: https://github.com/apache/shardingsphere/issues/32804


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org