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 2022/10/10 06:30:32 UTC

[GitHub] [shardingsphere] doveylovey opened a new issue, #16875: the select was routed to write-ds, why?

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

   ## Question
   
   1、this is my config:
   ![image](https://user-images.githubusercontent.com/28882195/163668189-58a48fe6-929e-4d3b-976c-543341539d8e.png)
   
   2、the execution result:
   ![image](https://user-images.githubusercontent.com/28882195/163668270-c918002f-25b8-45f0-a3aa-183eeb7db6b8.png)
   
   


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


[GitHub] [shardingsphere] strongduanmu commented on issue #16875: the select was routed to write-ds, why?

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

   > > @doveylovey Sorry, I made a typo. What I want to confirm is, are you executing the insert and select statements in transaction? The statements in the transaction will be executed by the primary datasource.
   > 
   > @strongduanmu yes, i executing the insert and select statements in transaction. But, if I don't do that, how do you guarantee transactions?
   
   If you start a transaction, I think the route result is right. For more detail, please refer to this doc——https://shardingsphere.apache.org/document/current/cn/features/readwrite-splitting/use-norms.


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


[GitHub] [shardingsphere] github-actions[bot] commented on issue #16875: the select was routed to write-ds, why?

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #16875:
URL: https://github.com/apache/shardingsphere/issues/16875#issuecomment-1272349987

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


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


[GitHub] [shardingsphere] github-actions[bot] closed issue #16875: the select was routed to write-ds, why?

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #16875: the select was routed to write-ds, why?
URL: https://github.com/apache/shardingsphere/issues/16875


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > > > @doveylovey Sorry, I made a typo. What I want to confirm is, are you executing the insert and select statements in transaction? The statements in the transaction will be executed by the primary datasource.
   > > 
   > > 
   > > @strongduanmu yes, i executing the insert and select statements in transaction. But, if I don't do that, how do you guarantee transactions?
   > 
   > If you start a transaction, I think the route result is right. For more detail, please refer to this doc——https://shardingsphere.apache.org/document/current/cn/features/readwrite-splitting/use-norms.
   
   @strongduanmu Ok, thank you very much


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


[GitHub] [shardingsphere] zjcnb commented on issue #16875: the select was routed to write-ds, why?

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

   > @zjcnb Has this problem been solved now?Please tell me what I should do.
   
   @doveylovey Hi, you can find `OrderServiceImpl.class` in `example-spring-mybatis` module. Remove `@Transactional ` annotation in `processFailure()` method and `processSuccess()` method.


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > The same to #14868
   
   Has this problem been solved now?Please tell me what I should do?


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > > @zjcnb Has this problem been solved now?Please tell me what I should do.
   > 
   > @doveylovey Hi, you can find `OrderServiceImpl.class` in `example-spring-mybatis` module. Remove `@Transactional ` annotation in `processFailure()` method and `processSuccess()` method.
   
   @zjcnb Your solution only works for example-spring-mybatis module, What about other modules?


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   @zjcnb Has this problem been solved now?Please tell me what I should do.


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   @zjcnb Your solution only works for example-spring-mybatis module, What about other modules?


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


[GitHub] [shardingsphere] TeslaCN closed issue #16875: the select was routed to write-ds, why?

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #16875: the select was routed to write-ds, why?
URL: https://github.com/apache/shardingsphere/issues/16875


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > @doveylovey Sorry, I made a typo. What I want to confirm is, are you executing the insert and select statements in transaction? The statements in the transaction will be executed by the primary datasource.
   
   @strongduanmu yes, i executing the insert and select statements in transaction. But, if I don't do that, how do you guarantee transactions?


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > > @zjcnb Has this problem been solved now?Please tell me what I should do.
   > 
   > @doveylovey Hi, you can find `OrderServiceImpl.class` in `example-spring-mybatis` module. Remove `@Transactional ` annotation in `processFailure()` method and `processSuccess()` method.
   
   Your solution only works for `example-spring-mybatis` module, What about other modules?


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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > Hi @doveylovey, can you execute insert statement and select statement in a transaction?
   
   @strongduanmu I can't understand what you said, can you speed up how to modify?


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


[GitHub] [shardingsphere] strongduanmu commented on issue #16875: the select was routed to write-ds, why?

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

   Hi @doveylovey, can you execute insert statement and select statement in a 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] doveylovey commented on issue #16875: the select was routed to write-ds, why?

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

   > Hi @doveylovey, can you execute insert statement and select statement in a transaction?
   
   This is an example in the project, I just changed the configuration, can you tell me how to change 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


[GitHub] [shardingsphere] strongduanmu commented on issue #16875: the select was routed to write-ds, why?

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

   @doveylovey Sorry, I made a typo. What I want to confirm is, are you executing the insert and select statements in transaction? The statements in the transaction will be executed by the primary datasource.


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


[GitHub] [shardingsphere] zjcnb commented on issue #16875: the select was routed to write-ds, why?

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

   The same to #14868


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