pengliaoye commented on issue #7347:
URL: https://github.com/apache/shardingsphere/issues/7347#issuecomment-689916783


   @kimmking  first execute, seata server log:
   
![1](https://user-images.githubusercontent.com/2573426/92670875-894d6600-f347-11ea-8cb5-f9d15394e941.png)
   and sencond execute same code, seata server log:
   
![2](https://user-images.githubusercontent.com/2573426/92670903-99654580-f347-11ea-9d38-616fb375ec62.png)
   
   
![3](https://user-images.githubusercontent.com/2573426/92671256-5657a200-f348-11ea-8ab6-e529b9b5d07f.png)
   
   
   my code snippet。same code, different port。 
   Service A: 8080
   Service B: 8081
   
   Service A:  invoke insertOrderA,and using feigin invoke Service B   
insertOrderB method
   Service B: has insertOrderB method
   
       @GlobalTransactional
       @ShardingTransactionType(TransactionType.BASE)
       public void insertOrderA(Order order) {
           System.out.println("全局事务id 1 :" + RootContext.getXID() + 
TransactionTypeHolder.get());
           orderMapper.insert(order);
           System.out.println("全局事务id 2 :" + RootContext.getXID()  + 
TransactionTypeHolder.get());
           demoClient.testInsertB();
       }
   
       @ShardingTransactionType(TransactionType.BASE)
       public void insertOrderB(Order order) {
           System.out.println("全局事务id 3 :" + RootContext.getXID()  + 
TransactionTypeHolder.get());
           orderMapper.insert(order);
           System.out.println("全局事务id 4 :" + RootContext.getXID()  + 
TransactionTypeHolder.get());
           throw new RuntimeException("mock transaction failed");
       }
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to