Skip to content

Commit

Permalink
update note
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoweilong007 committed Dec 2, 2022
1 parent b54e923 commit f79edbb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions notes/seata.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,16 @@ image,讲前后镜像数据以及业务sql组成一条回滚日志记录,插

- seata默认隔离级别是读未提交
- 如需要求读已提交,使用select FROM UPDATE语句


seata执行流程:

- TM向TC请求开启全局事务,TC生成一个XID代表此次全局事务并返回给TM

- XID会在微服务的调用链传递

- RM将本地事务作为一个分支,通过XID注册到全局事务中,有TC来负责协调该分支

- TM通过XID来告诉TC去提交/回滚该XID绑定的全局事务

- TC通过XID找到对应的每一个分支事务,去协调RM去提交/回滚每个分支事务(此处的分支事务不是刚刚一阶段的本地事务,而是TM角度上的一个全局事务try+commit/cancel)

0 comments on commit f79edbb

Please sign in to comment.