You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/08/23 07:37:57 UTC

[GitHub] [incubator-shardingsphere] Myshiner opened a new issue #2914: The write operation is routed to master database and the following read operations are routed to slave database in the same thread

Myshiner opened a new issue #2914: The write operation is routed to master database and the following read operations are routed to slave database in the same thread
URL: https://github.com/apache/incubator-shardingsphere/issues/2914
 
 
   Version: sharding-proxy 4.0.0-RC1 and 3.1.0
    The official document said  that if there is write operation in the same thread and database connection, all the following read operations are from the master database. In my case, the write operation is routed to master database and the following read operations are routed to slave database in the same thread, Any suggestions ?
   I am sure i did follow the offical document configuration and here is the configure code.
   -------------------------------------
   schemaName: neworiental_v3
   dataSources:
     neworiental_v3:
       url: jdbc:mysql://192.168.10.11:3406/neworiental_v3?serverTimezone=UTC&useSSL=false
       username: writer
       password: 1a2s3dQWE~
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     slave_v3_0:
       url: jdbc:mysql://192.168.10.11:4406/neworiental_v3?serverTimezone=UTC&useSSL=false
       username: reader
       password: 1a2s3dQWE~
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   masterSlaveRule:
     name: ms_v3
     masterDataSourceName: neworiental_v3
     slaveDataSourceNames:
       - slave_v3_0

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services