GitHub user hzc2001 edited a discussion: 为什么新增可以回滚,修改不能回滚 AT模式
seata是1.6.1版本,seata注册nacos,模式是db。A、B,两端接入,A调用feign接口 在B端同一个方法里面先新增数据,后修改数据,是两条不同的数据,且修改时用主键id为条件且没有多租户。A调用完feign接口后会抛出异常,B端的新增语句被回滚,但修改语句没有回滚,是什么原因 seata 日志 17:51:15.144 INFO --- [ batchLoggerPrint_1_1] i.s.c.r.p.server.BatchLogHandler : timeout=60000,transactionName=open(java.lang.Long),clientIp:192.168.31.31,vgroup:lingling-system-group 17:51:15.216 INFO --- [verHandlerThread_1_33_500] i.s.s.coordinator.DefaultCoordinator : Begin new global transaction applicationId: saas-ipd,transactionServiceGroup: lingling-system-group, transactionName: open(java.lang.Long),timeout:60000,xid:172.19.0.1:8091:2018355300659464360 17:51:15.264 INFO --- [ batchLoggerPrint_1_1] i.s.c.r.p.server.BatchLogHandler : SeataMergeMessage xid=172.19.0.1:8091:2018355300659464360,branchType=AT,resourceId=jdbc:mysql://127.0.0.1:22414/lingling_srm,lockKey=srm_project_procure:2282 ,clientIp:192.168.31.31,vgroup:lingling-system-group 17:51:15.383 INFO --- [Pool.commonPool-worker-30] i.seata.server.coordinator.AbstractCore : Register branch successfully, xid = 172.19.0.1:8091:2018355300659464360, branchId = 2018355300659464362, resourceId = jdbc:mysql://127.0.0.1:22414/lingling_srm ,lockKeys = srm_project_procure:2282 17:51:15.476 INFO --- [ batchLoggerPrint_1_1] i.s.c.r.p.server.BatchLogHandler : SeataMergeMessage xid=172.19.0.1:8091:2018355300659464360,branchType=AT,resourceId=jdbc:mysql://127.0.0.1:22414/lingling_srm,lockKey=srm_project_procure:1 ,clientIp:192.168.31.31,vgroup:lingling-system-group 17:51:15.650 INFO --- [Pool.commonPool-worker-30] i.seata.server.coordinator.AbstractCore : Register branch successfully, xid = 172.19.0.1:8091:2018355300659464360, branchId = 2018355300659464364, resourceId = jdbc:mysql://127.0.0.1:22414/lingling_srm ,lockKeys = srm_project_procure:1 17:51:15.766 INFO --- [ batchLoggerPrint_1_1] i.s.c.r.p.server.BatchLogHandler : xid=172.19.0.1:8091:2018355300659464360,extraData=null,clientIp:192.168.31.31,vgroup:lingling-system-group 17:51:16.110 INFO --- [verHandlerThread_1_36_500] io.seata.server.coordinator.DefaultCore : Rollback branch transaction successfully, xid = 172.19.0.1:8091:2018355300659464360 branchId = 2018355300659464364 17:51:16.385 INFO --- [verHandlerThread_1_36_500] io.seata.server.coordinator.DefaultCore : Rollback branch transaction successfully, xid = 172.19.0.1:8091:2018355300659464360 branchId = 2018355300659464362 17:51:16.386 INFO --- [verHandlerThread_1_36_500] io.seata.server.coordinator.DefaultCore : Rollback global transaction successfully, xid = 172.19.0.1:8091:2018355300659464360. B端日志 17:51:15.902 [rpcDispatch_RMROLE_1_5_56] INFO i.s.c.r.p.c.RmBranchRollbackProcessor - [process,56] - rm handle branch rollback process:xid=172.19.0.1:8091:2018355300659464360,branchId=2018355300659464364,branchType=AT,resourceId=jdbc:mysql://127.0.0.1:22414/lingling_srm,applicationData=null 17:51:15.903 [rpcDispatch_RMROLE_1_5_56] INFO i.s.r.AbstractRMHandler - [doBranchRollback,123] - Branch Rollbacking: 172.19.0.1:8091:2018355300659464360 2018355300659464364 jdbc:mysql://127.0.0.1:22414/lingling_srm 17:51:15.906 [rpcDispatch_RMROLE_1_5_56] INFO i.s.r.d.u.AbstractUndoExecutor - [dataValidationAndGoOn,241] - Stop rollback because there is no data change between the before data snapshot and the after data snapshot. 17:51:15.993 [rpcDispatch_RMROLE_1_5_56] INFO i.s.r.d.u.AbstractUndoLogManager - [undo,336] - xid 172.19.0.1:8091:2018355300659464360 branch 2018355300659464364, undo_log deleted with GlobalFinished 17:51:15.994 [rpcDispatch_RMROLE_1_5_56] INFO i.s.r.AbstractRMHandler - [doBranchRollback,131] - Branch Rollbacked result: PhaseTwo_Rollbacked 17:51:16.111 [rpcDispatch_RMROLE_1_6_56] INFO i.s.c.r.p.c.RmBranchRollbackProcessor - [process,56] - rm handle branch rollback process:xid=172.19.0.1:8091:2018355300659464360,branchId=2018355300659464362,branchType=AT,resourceId=jdbc:mysql://127.0.0.1:22414/lingling_srm,applicationData=null 17:51:16.111 [rpcDispatch_RMROLE_1_6_56] INFO i.s.r.AbstractRMHandler - [doBranchRollback,123] - Branch Rollbacking: 172.19.0.1:8091:2018355300659464360 2018355300659464362 jdbc:mysql://127.0.0.1:22414/lingling_srm 17:51:16.227 [rpcDispatch_RMROLE_1_6_56] INFO i.s.r.d.u.AbstractUndoLogManager - [undo,336] - xid 172.19.0.1:8091:2018355300659464360 branch 2018355300659464362, undo_log deleted with GlobalFinished 17:51:16.227 [rpcDispatch_RMROLE_1_6_56] INFO i.s.r.AbstractRMHandler - [doBranchRollback,131] - Branch Rollbacked result: PhaseTwo_Rollbacked GitHub link: https://github.com/apache/incubator-seata/discussions/7983 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
