You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "ulwx (via GitHub)" <gi...@apache.org> on 2023/02/24 03:43:59 UTC

[GitHub] [shardingsphere] ulwx opened a new issue, #24332: 5.3.1 When integrating seata global transactions, if there are also global transactions on the periphery, the commit () method reports a null exception

ulwx opened a new issue, #24332:
URL: https://github.com/apache/shardingsphere/issues/24332

   ```
   GlobalTransaction globalTransaction = GlobalTransactionContext.getCurrentOrCreate();
   globalTransaction.begin(timeout * 1000);     
   TransactionTypeHolder.set(TransactionType.BASE);
   try{
       doInsert();
   }finally {
       TransactionTypeHolder.clear();
   }
   globalTransaction.commit();
   ```
   When the above code is running, doInsert() will throw a null exception, which is thrown by the commit() method in doInsert(). The reason is that when the shardingjdbc proxy commit() method is used, because the SeataATShardingSphereTransactionManager # begin() method has not been executed because of the existence of GlobalTransaction on the periphery, the TransactionTypeHolder # set() method has not been executed and is always empty, Thus, when the shardingjdbc agent commit() method is executed, the query is null through TransactionTypeHolder # get(), and a null pointer exception is reported!
   


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

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


[GitHub] [shardingsphere] FlyingZC commented on issue #24332: 5.3.1 When integrating seata global transactions, if there are also global transactions on the periphery, the commit () method reports a null exception

Posted by "FlyingZC (via GitHub)" <gi...@apache.org>.
FlyingZC commented on issue #24332:
URL: https://github.com/apache/shardingsphere/issues/24332#issuecomment-1445650420

   Not support starting the SEATA AT transaction from the outside.ShardingSphere starts the SEATA AT transaction by itself.


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