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:28:25 UTC

[GitHub] [shardingsphere] ulwx opened a new issue, #24331: 5.3.1 集成seata全局事务时,如果外围同样存在全局事务时,commit()方法报空异常

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

   ```
   GlobalTransaction globalTransaction = GlobalTransactionContext.getCurrentOrCreate();
   globalTransaction.begin(timeout * 1000);     
   TransactionTypeHolder.set(TransactionType.BASE);
   try{
       doInsert();
   }finally {
       TransactionTypeHolder.clear();
   }
   globalTransaction.commit();
   ```
   上述代码运行时,doInsert()会抛出null异常,是doInsert()里的commit()方法抛出的,原因是shardingjdbc代理commit()方法时,由于SeataATShardingSphereTransactionManager#begin()方法因为外围存在GlobalTransaction而一直没有执行,导致TransactionTypeHolder#set()没有执行,一直为空,从而在shardingjdbc代理commit()方法执行时通过TransactionTypeHolder#get()查询为空,报null指针异常


-- 
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 #24331: 5.3.1 集成seata全局事务时,如果外围同样存在全局事务时,commit()方法报空异常

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

   Please use English and submit an issue according to the template.


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


[GitHub] [shardingsphere] zhaojinchao95 closed issue #24331: 5.3.1 集成seata全局事务时,如果外围同样存在全局事务时,commit()方法报空异常

Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 closed issue #24331: 5.3.1 集成seata全局事务时,如果外围同样存在全局事务时,commit()方法报空异常
URL: https://github.com/apache/shardingsphere/issues/24331


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


[GitHub] [shardingsphere] zhaojinchao95 commented on issue #24331: 5.3.1 集成seata全局事务时,如果外围同样存在全局事务时,commit()方法报空异常

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

   Please translate your issue and create a new issue.


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