ShardingSphere整合seata分布式事务源码流程
2023-03-22 23:36:34 0 举报
ShardingSphere整合seata分布式事务源码流程
作者其他创作
大纲/内容
io.seata.core.rpc.netty.AbstractNettyRemoting#sendSync
io.seata.core.rpc.netty.AbstractNettyRemotingClient#sendSyncRequest(java.lang.Object)
io.seata.tm.DefaultTransactionManager#syncCall
org.springframework.jdbc.datasource.DataSourceTransactionManager#doBegin
向tc发起全局提交
AbstractPlatformTransactionManager#getTransaction
ShardingSphereConnection#processDistributeTransaction
ConnectionTransaction#commit
seata-server
AbstractPlatformTransactionManager#startTransaction
ShardingSphereConnection#commit
spring
AbstractPlatformTransactionManager#commit
io.seata.tm.api.DefaultGlobalTransaction#commit
ConnectionProxy#processGlobalTransactionCommit
TransactionInterceptor.invoke
成功
io.seata.rm.AbstractResourceManager#branchRegister
seata-client
TransactionAspectSupport#invokeWithinTransaction
ShardingSpherePreparedStatement#execute
向数据库保存undo_log数据
mysql jdbc驱动
sql执行引擎
AbstractUndoLogManager#flushUndoLogs
数据源Hikarcp
向seata-client发起全局提交
io.seata.tm.DefaultTransactionManager#commit
io.seata.tm.DefaultTransactionManager#begin
ConnectionManager#commit
开启全局事务流程
如果是失败,则回滚,走这里:TransactionAspectSupport#completeTransactionAfterThrowing
ExecuteTemplate#execute()
SeataATShardingSphereTransactionManager#begin(int)
io.seata.rm.datasource.ConnectionProxy#register
ConnectionProxy#doCommit
DataSourceTransactionManager#doCommit
com.mysql.cj.jdbc.ConnectionImpl#commit
ShardingSphereConnection#setAutoCommit
AbstractPlatformTransactionManager#processCommit
二阶段提交流程
分支事务注册流程
TransactionAspectSupport#commitTransactionAfterReturning
PreparedStatementHandler#update
MySQLUndoLogManager#insertUndoLogWithNormal
com.zaxxer.hikari.pool.ProxyConnection#commit
ShardingSphere
调用业务逻辑
SeataATShardingSphereTransactionManager#commit
0 条评论
下一页