-
Notifications
You must be signed in to change notification settings - Fork 435
转账场景:转出服务confirm阶段判断金额超出,抛出异常,本地事务回滚了,全局事务没有收到异常,全局事务被成功了 #742
Comments
Normally we don't call any cancel method if the confirm method is failed. |
So,if meet error on "confirm" method,what we shuold do for the next |
I think if we do not check and protect on "confirm" method(like check balance),there would be problems on concurrent requests context(like multiple requests transfer out money and substract balance). |
Just like the calling commit method with JDBC, it could be failed,we can do some other recovery work later. My suggestion is we check the balance or even withdraw some money from the account in the prepare method. If the cancel method call is failed, we need to do some manually recovery work with more detail transaction context information then. In this way , we can make our system more easy to maintain. |
It looks more like SAGA rather than TCC. |
Would you supplied me some success case for other company or project? There is some doubt about that we could use this framework for my product system. |
Current , we just do some coordinations between different sub transactions by leveraging the framework that Pack provides. There are some timeout and retry policies we can apply to the Omega agent for the best effort call, but it dependents on the user scenario details. |
转出服务的confirm方法:
`
全局事务没有收到错误或异常,造成全局事务执行成功的错误结果:
`
The text was updated successfully, but these errors were encountered: