diff --git a/docs/document/content/features/transaction/concept/base-transaction-seata.cn.md b/docs/document/content/features/transaction/concept/base-transaction-seata.cn.md index 555cce2de2adf86b58fa307df3e15eb5db2d6a75..59d8744d5c7a08e91b63a1a3d50512244e076d75 100644 --- a/docs/document/content/features/transaction/concept/base-transaction-seata.cn.md +++ b/docs/document/content/features/transaction/concept/base-transaction-seata.cn.md @@ -13,4 +13,12 @@ weight = 3 `Seata AT`事务模型包含TM(事务管理器),RM(资源管理器),TC(事务协调器)。其中TC是一个独立的服务需要单独部署,TM和RM以jar包的方式同业务应用部署在一起,它们同TC建立长连接,在整个事务生命周期内,保持RPC通信。 其中全局事务的发起方作为TM,全局事务的参与者作为RM ; TM负责全局事务的begin和commit/rollback,RM负责分支事务的执行结果上报,并且通过TC的协调进行commit/rollback。 +Seata管理的分布式事务的典型生命周期: + +1. TM要求TC开始一个全新的全局事务。TC生成一个代表该全局事务的XID。 +2. XID贯穿于微服务的整个调用链。 +3. 作为该XID对应到的TC下的全局事务的一部分,RM注册了本地事务。 +4. TM要求TC提交或回退XID对应的全局事务。 +5. TC驱动XID对应的全局事务下的所有分支事务完成提交或回退。 + ![Seata AT事务模型](https://shardingsphere.apache.org/document/current/img/transaction/seata-at-transaction.png) \ No newline at end of file diff --git a/docs/document/content/features/transaction/concept/base-transaction-seata.en.md b/docs/document/content/features/transaction/concept/base-transaction-seata.en.md index 99b05ed6dcb74ba87a0cfa5bb2477579bc63c2fc..ebb8259c378ac2a58968356206662f3f245981a1 100644 --- a/docs/document/content/features/transaction/concept/base-transaction-seata.en.md +++ b/docs/document/content/features/transaction/concept/base-transaction-seata.en.md @@ -15,4 +15,12 @@ deployed together with business applications in the form of jar packages. They e The initiator of global transaction is TM, and the participant of global transaction is RM; TM is in charge of begin and commit/rollback of global transaction, RM is in charge of reporting the execution results of branch transaction, and commit/rollback is executed through TC coordination. +A typical lifecycle of Seata managed distributed transaction: + +1. TM asks TC to begin a new global transaction. TC generates an XID representing the global transaction. +2. XID is propagated through microservices' invoke chain. +3. RM register local transaction as a branch of the corresponding global transaction of XID to TC. +4. TM asks TC for committing or rollbacking the corresponding global transaction of XID. +5. TC drives all branch transactions under the corresponding global transaction of XID to finish branch committing or rollbacking. + ![Seata AT transaction model](https://shardingsphere.apache.org/document/current/img/transaction/seata-at-transaction.png) \ No newline at end of file