Re:Re: Would sharded database has data integrity issue when a shard fail

2019-09-08 Thread Sion Yang
Do you use sharding-proxy? If you use sharding-proxy, you can send `sctl:set transaction_type=` before you begin transaction. you also can get information in https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/usage/ -- Yi Yang(Sion) Apache ShardingSphere At

Re: Would sharded database has data integrity issue when a shard fail

2019-09-08 Thread Eric
Hi Sion, Thank you. The document uses TransactionTypeHolder to modify transaction type in Java. Is it possible to set it in proxy yaml file? Regards, Eric Poon On Mon, Sep 9, 2019 at 8:45 AM Sion Yang wrote: > Hi, > > > There are three kinds of distributed transaction in ShardingSphere,

Re: Create table returns error cannot find table rule

2019-09-08 Thread Juan Pan
Yes, you’re right. The sharding rule is prerequisite before you execute any SQL. - Juan Pan (Trista) Apache ShardingSphere Eric 于2019年9月9日周一 上午5:53写道: > Hi Juan, > > Thank you. > > I think that makes sense because rules are need for the routing even though > the

Re:Would sharded database has data integrity issue when a shard fail

2019-09-08 Thread Sion Yang
Hi, There are three kinds of distributed transaction in ShardingSphere, local, two phase commit and BASE. Default is local transaction. For local transaction, if the SQL execute failed before commit, all sharding data node will be rollback. If failed in commit, the other sharding data node

Re: Multiple SQL units scene

2019-09-08 Thread 厉忠
I understand,Thank you Juan Pan 于2019年9月8日周日 上午10:41写道: > Sorry, i can not get your idea. But when Sharding and multiple tables are > existed in one database, it is possible that a SQL is executed in multiple > tables in one database. > - > Juan Pan (Trista) >

Would sharded database has data integrity issue when a shard fail

2019-09-08 Thread Eric
Hi, If a shard fail on a transaction, would the transactions on the other shards rolled back together? Let say I have 100 payments being updated in one sql statement (e.g. update payment set remark = 'xxx' where customer = 'yyy'), the records are distributed on several shards. A shard failed to

Using ShardingSphere for auto failover

2019-09-08 Thread Eric
Hi, I read the examples but seems can't get if ShardingSphere can be setup to do auto failover? With Master / Slave, if the Master fail, seems the system will fail to write. Anyone has idea how to achieve auto failover with ShardingSphere? Regards, Eric Poon

Re: Create table returns error cannot find table rule

2019-09-08 Thread Eric
Hi Juan, Thank you. I think that makes sense because rules are need for the routing even though the table can be created. Which means the rule has to be setup before creating tables. Regards, Eric Poon

Re: Subscribe Mailbox

2019-09-08 Thread zhangli...@apache.org
Welcome onboard -- Liang Zhang (John) Apache ShardingSphere & Dubbo 厉忠 于2019年9月6日周五 下午9:13写道: > Hello, In order to better learn the core knowledge of ShardingSphere, I > want to subscribe to the ShardingSphere developer email, This will quickly > get the issue submitted by