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

在 TCC 的 Confirm, Cancel 两个阶段调用 HmilyContextHolder.get() 返回 null #296

Open
WebbDong opened this issue May 4, 2021 · 2 comments

Comments

@WebbDong
Copy link

WebbDong commented May 4, 2021

Describe the bug

在 Spring Cloud 微服务环境使用 Hmily 2.1.1 版本,只要在 Confirm, Cancel 两个阶段调用 HmilyContextHolder.get() 返回 null,无法获取到 HmilyTransactionContext。

代码连接:https://github.com/WebbDong/JAVA-01/tree/main/Week_08/lesson16/spring-cloud-hmily-bank-tcc

Environment

  • hmily version(s): [e.g. 2.1.1]
@jzjie007
Copy link

是这个问题, 我在 Cancel 阶段用了很多个方法去获取 transactionId,都不生效,全都是空
Long txNo1 = HmilyContextHolder.get().getTransId();
Long txNo2 = new ThreadLocalHmilyContext().get().getTransId();
Long txNo3 = HmilyTransactionHolder.getInstance().getCurrentTransaction().getTransId();

@yu199195
Copy link
Member

已经在master修复,只是还没发布

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

3 participants