Skip to content
New issue

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

springcloud环境, confirm逻辑中调用feign接口报错 #150

Open
jujukoko85 opened this issue May 14, 2022 · 1 comment
Open

springcloud环境, confirm逻辑中调用feign接口报错 #150

jujukoko85 opened this issue May 14, 2022 · 1 comment

Comments

@jujukoko85
Copy link

bytetcc0.5.12 整合springcloud. 服务A和服务B组成TCC事务.
服务A与服务B的try都成功了. 当bytetcc框架执行服务A的confirm逻辑时,
由于我在服务A的confirm逻辑中调用了服务C的一个feign接口.
bytetcc貌似仍然会针对服务C的feign接口执行传播事务相关的逻辑.
导致CompensableTransactionImpl.enlistResource方法导致抛IllegalStateException异常.

请问:
针对这种confirm逻辑中调用不参与tcc的服务C的feign接口的情况,
可以让调用服务C的feign接口时, 不执行事务传播逻辑么?

@liuyangming
Copy link
Owner

ByteTCC有一个约定: 所有的远程调用均只能在Try阶段执行。confirm/cancel阶段仅限于确认/取消本服务的业务操作。byteTCC如果检测到confirm/cancel存在远程调用,就会抛出异常,也就是你说的这种情况。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants