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 10:39:18 UTC

[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

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