![](https://img.haomeiwen.com/i5072576/c2655512955c80f1.png)
在注册分支事务前,先创建lock,我们先看看branchSessionLock这个方法
![](https://img.haomeiwen.com/i5072576/1385f6432fa9c027.png)
![](https://img.haomeiwen.com/i5072576/f2c2ea72b70b1ea7.png)
![](https://img.haomeiwen.com/i5072576/c00c06e7cd94fbd6.png)
checksql:select xid, transaction_id, branch_id, resource_id, table_name, pk, row_key, gmt_create, gmt_modified from lock_table where row_key in (?)
执行sql
![](https://img.haomeiwen.com/i5072576/e309ecdc62f306e5.png)
可以lock
![](https://img.haomeiwen.com/i5072576/202c8862101f10ea.png)
插入lock数据
![](https://img.haomeiwen.com/i5072576/ada5ef3848c99da7.png)
![](https://img.haomeiwen.com/i5072576/720b7accf59cfd02.png)
下面是添加分支事务
![](https://img.haomeiwen.com/i5072576/07381ef8b2ab92f5.png)
插入分支事务
![](https://img.haomeiwen.com/i5072576/9f22c271f5914724.png)
在注册分支事务前,先创建lock,我们先看看branchSessionLock这个方法
checksql:select xid, transaction_id, branch_id, resource_id, table_name, pk, row_key, gmt_create, gmt_modified from lock_table where row_key in (?)
执行sql
可以lock
插入lock数据
下面是添加分支事务
插入分支事务
本文标题:tc端分支注册流程
本文链接:https://www.haomeiwen.com/subject/lqdclrtx.html
网友评论