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 2020/11/19 03:48:46 UTC

[GitHub] [shardingsphere] iamif3000 opened a new issue #8215: read-request after a write-reqeust routes to slave in the same transaction

iamif3000 opened a new issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   tag 4.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   sharding-proxy
   
   ### Expected behavior
   read request shoud be sent to master db node.
   
   ### Actual behavior
   read request routes to slave db node.
   
   ### Reason analyze (If you can)
   I think the status of the transaction is not updated correctly after the execution of write request.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   `CREATE TABLE `test` ( `id` BIGINT ( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR ( 200 ) DEFAULT NULL, PRIMARY KEY ( `id` ) ) ENGINE = INNODB  DEFAULT CHARSET = utf8;`
   - login with mysql client
   - run the following sql
     - start transaction;
     - insert into test values(null, 'tran1');
     - select id,name from test;
     - commit;
   - check the log output of sharding-proxy
   > [INFO ] 11:29:25.186 [ShardingSphere-Command-3] ShardingSphere-SQL - Actual SQL: master_ds ::: insert into test values(null, 'tran1')
   > [INFO ] 11:29:34.688 [ShardingSphere-Command-0] ShardingSphere-SQL - Actual SQL: slave_ds_0 ::: select id,name from test
   
   ### Example codes for reproduce this issue (such as a github link).
   None


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



[GitHub] [shardingsphere] kimmking commented on issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215#issuecomment-730156920


   I reproduce it on 5.0.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



[GitHub] [shardingsphere] kimmking commented on issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215#issuecomment-730150748


   I will check this issue in 4.1.1 and 5.0.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



[GitHub] [shardingsphere] Lucas-307 closed issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
Lucas-307 closed issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215


   


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



[GitHub] [shardingsphere] terrymanu commented on issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215#issuecomment-731918748


   First analyzation:
   Replica-query work with transaction may break after refactor.


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



[GitHub] [shardingsphere] terrymanu removed a comment on issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
terrymanu removed a comment on issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215#issuecomment-804035650


   Replica-query cannot support transaction


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



[GitHub] [shardingsphere] terrymanu commented on issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215#issuecomment-804035650


   Replica-query cannot support transaction


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



[GitHub] [shardingsphere] terrymanu closed issue #8215: read-request after a write-reqeust routes to slave in the same transaction

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8215:
URL: https://github.com/apache/shardingsphere/issues/8215


   


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