We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
例如A调用B ,A执行完Try过程,B执行Try失败。 我理解由于B的Try是本地事务遇到Exception已经rollback了,所以不需要执行cancel流程,只需要执行A的cancel即可。但是目前的框架还是会同时执行B的cancel和A的cancel,是不是控制上不太对?
The text was updated successfully, but these errors were encountered:
@liuyb02 框架确实是设计成会执行B的Cancel方法,主要原因是 Try方法的实现是业务自己实现,可能会有多个事务执行,或是多个持久化操作,并没有限制只能在一个本地事务里,所以,如果在执行了一半时异常了,就有cancel的需要;在cancel方法里,业务可根据当前数据来决定如何rollback(比如,不用rollback)。另外,cancel方法和confirm方法需要保持幂等性。
Sorry, something went wrong.
B执行失败,可以不去rollback,rollback逻辑放在cancel里去做
No branches or pull requests
例如A调用B ,A执行完Try过程,B执行Try失败。
我理解由于B的Try是本地事务遇到Exception已经rollback了,所以不需要执行cancel流程,只需要执行A的cancel即可。但是目前的框架还是会同时执行B的cancel和A的cancel,是不是控制上不太对?
The text was updated successfully, but these errors were encountered: