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/09/28 10:37:53 UTC

[GitHub] [shardingsphere] FlyingZC commented on issue #21237: In READWRITE_SPLITTING mode,transaction commit is error

FlyingZC commented on issue #21237:
URL: https://github.com/apache/shardingsphere/issues/21237#issuecomment-1260716685

   I can't reproduce it locally.
   ```sql
   sharding_db=> drop table if exists t_single;
   DROP TABLE
   sharding_db=> create table t_single(id int,c_id int,a int,b text);
   CREATE TABLE
   sharding_db=> insert into t_single values (1,1,10,'test1'),(1,2,10,'test1'),(2,2,20,'test2'),
   (3,3,10,'test3'),(4,4,40,'test4'),(5,5,50,'test5');sharding_db->
   INSERT 0 6
   sharding_db=> create index idx_rw on t_single(id);
   CREATE INDEX
   sharding_db=> select * from t_single;
   select * from t_single;
   select * from t_single; id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
     1 |    2 | 10 | test1
     2 |    2 | 20 | test2
     3 |    3 | 10 | test3
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (6 rows)
   
   sharding_db=>  id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
     1 |    2 | 10 | test1
     2 |    2 | 20 | test2
     3 |    3 | 10 | test3
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (6 rows)
   
   sharding_db=>
    id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
     1 |    2 | 10 | test1
     2 |    2 | 20 | test2
     3 |    3 | 10 | test3
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (6 rows)
   
   sharding_db=> begin;
   BEGIN
   sharding_db=> insert into t_single values(6,6,60,'test6');
   INSERT 0 1
   sharding_db=> select * from t_single;
    id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
     1 |    2 | 10 | test1
     2 |    2 | 20 | test2
     3 |    3 | 10 | test3
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (6 rows)
   
   sharding_db=> select * from t_single;
   end; id | c_id | a  |   b
   ----+------+----+-------
     1 |    1 | 10 | test1
     1 |    2 | 10 | test1
     2 |    2 | 20 | test2
     3 |    3 | 10 | test3
     4 |    4 | 40 | test4
     5 |    5 | 50 | test5
   (6 rows)
   
   sharding_db=>
   COMMIT
   sharding_db=> SHOW TRANSACTION RULE;
    default_type | provider_type | props
   --------------+---------------+-------
    XA           | Narayana      |
   (1 row)
   
   sharding_db=>
   ```
   
   
   <img width="664" alt="image" src="https://user-images.githubusercontent.com/19788130/192758413-ea3117fe-6a34-4ef7-9843-e76422e5f922.png">
   <img width="451" alt="image" src="https://user-images.githubusercontent.com/19788130/192758457-8ffac7b7-82cf-4a70-8ec5-7832b16ea7b6.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

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