-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Labels
type: bugCategory issues or prs related to bug.Category issues or prs related to bug.
Description
Ⅰ. Issue Description
在使用TCC模式下时,调用到commit方法和rollback方法时,方法内BusinessActionContext.getBranchType()得到内容为null。
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
- 接口使用@LocalTCC注解
- prepare方法使用@TwoPhaseBusinessAction注解,
- prepare方法、commit方法、rollback方法第一个参数均为BusinessActionContext
- prepare方法可以正常获取到branchType为TCC,commit方法和rollback方法获取branchType为null
Minimal yet complete reproducer code (or URL to code):
Ⅴ. Anything else we need to know?
目前调试发现在org.apache.seata.rm.tcc.TCCResourceManager中branchCommit方法和branchRollback方法参数中有branchType值且取值正常,但方法体中未使用该值(包括创建BusinessActionContext对象)。
当前代码仓库中也未使用该值TCCResourceManager
Ⅵ. Environment:
- JDK version(e.g.
java -version): 21 - Seata client/server version: client: 2.1.0 server: 2.2.0
- Database version: 未使用
- OS(e.g.
uname -a): Linux zk1 5.18.15-1.el7.elrepo.x86_64 fescar init #1 SMP PREEMPT_DYNAMIC Thu Jul 28 09:26:15 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux - Others:
Metadata
Metadata
Assignees
Labels
type: bugCategory issues or prs related to bug.Category issues or prs related to bug.