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 2021/09/11 08:55:57 UTC

[GitHub] [shardingsphere] Lychengit opened a new issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

Lychengit opened a new issue #12368:
URL: https://github.com/apache/shardingsphere/issues/12368


   If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so 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] Lychengit commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   @strongduanmu Looking forward to your release! I'll try changing the version to alpha.


-- 
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] Lychengit commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   @RaigorJiang If only use A ShardingSphereDataSource, old single tables use the auto-incrementing Will throw an exception “Cannot find strategy for generate keys”. How can I solve this problem. 


-- 
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] RaigorJiang commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   And, according to your feedback, the FAQ also needs to be updated. thanks!


-- 
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] tristaZero edited a comment on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #12368:
URL: https://github.com/apache/shardingsphere/issues/12368#issuecomment-917593476


   hi @Lychengit Thanks for your comments. Did you configure `single tables`? Or make shardingsphere load them automatically?
   
   @strongduanmu Please check this issue on our master branch, thanks.
   > If only use A ShardingSphereDataSource, old single tables use the auto-incrementing Will throw an exception “Cannot find strategy for generate keys”. How can I solve this problem.


-- 
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] Lychengit commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   @RaigorJiang In order to keep the original table use the original datasource,I kept the original datasource,And created  a new ShardingSphereDataSource  to process sharding tables. How can I guarantee distributed transactions between two datasources!I use scheme 2 of FAQ. AS:
   
   6. If sharding database is partial, should tables without sharding database & table be configured in sharding rules?
   Answer:
   
   Yes. ShardingSphere merges multiple data sources to a united logic data source. Therefore, for the part without sharding database or table, ShardingSphere can not decide which data source to route to without sharding rules. However, ShardingSphere has provided two options to simplify configurations.
   
   Option 1: configure default-data-source. All the tables in default data sources need not to be configured in sharding rules. ShardingSphere will route the table to the default data source when it cannot find sharding data source.
   
   Option 2: isolate data sources without sharding database & table from ShardingSphere; use multiple data sources to process sharding situations or non-sharding situations.


-- 
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] RaigorJiang commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   Please refer to the document:
   https://shardingsphere.apache.org/document/current/en/features/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] strongduanmu commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   Hi @Lychengit, thank you for your feedback. I tested the `5.0.0-beta` version and executed the `insert statement` on the single table, and `Cannot find strategy for generate keys` exception occur. You can try the master branch, this problem has been fixed.


-- 
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] Lychengit commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   @tristaZero Single tables and  sharding tables exist in a database at the same time.  I configured the sharding tables configuration. do not configure single tables.
   
   ![1631444290(1)](https://user-images.githubusercontent.com/90435449/132984972-c50127a3-7324-4df8-98a4-dd07cf39b5e3.png)
   
   The current Maven configuration is(Latest version):
          <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core</artifactId>
               <version>5.0.0-beta</version>
           </dependency>


-- 
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] Lychengit closed issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   


-- 
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] Lychengit commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   @RaigorJiang Or how do I configure scheme 1(configure default-data-source),5.0.0-beta


-- 
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] tristaZero commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   hi @Lychengit Thanks for your comments. Did you configure `single tables`? Or make shardingsphere load them automatically?
   
   @strongduanmu Please check this issue on our master branch, thanks.


-- 
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] Lychengit commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   @RaigorJiang Except sharding tables, Other old single tables use the auto-incrementing primary key of the database that are not in the sharding rule,If only  use the ShardingSphereDataSource, old single tables use the auto-incrementing Will throw an exception “Cannot find strategy for generate keys”. so I need to choose one of scheme 1 and scheme 2. 
     I didn't find the configuration method of scheme 1 in the document. I'm using scheme 2, but I can't use shardingsphere transaction XA core to ensure distributed transactions. do you have any good solutions. thank you so 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] RaigorJiang commented on issue #12368: If sharding database is partial,How can I guarantee distributed transactions between two datasources!thank you so much

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


   Hi @Lychengit 
   Thank you for your detailed description. 
   `default-data-source` is a configuration item of version 4.0 and has been removed in 5.0.
   Because now shardingsphere can identify those single tables that are not configured with rules, and know which datasources they are in.
   According to the information you provided, I think it is enough to use `A ShardingSphereDataSource`, and only configure your sharding table in the rule. Single tables do not need to be configured.


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