-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feature: save tcc action context to fencelog #5272
base: 2.x
Are you sure you want to change the base?
Conversation
4373986
to
c796d4c
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## 2.x #5272 +/- ##
============================================
- Coverage 48.73% 48.35% -0.38%
+ Complexity 4339 4316 -23
============================================
Files 778 782 +4
Lines 27454 27523 +69
Branches 3412 3419 +7
============================================
- Hits 13380 13310 -70
- Misses 12677 12813 +136
- Partials 1397 1400 +3
|
...ration-tx-api/src/main/java/io/seata/integration/tx/api/fence/DefaultCommonFenceHandler.java
Outdated
Show resolved
Hide resolved
integration-tx-api/src/main/java/io/seata/integration/tx/api/fence/store/CommonFenceStore.java
Outdated
Show resolved
Hide resolved
@@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS `tcc_fence_log` | |||
`branch_id` BIGINT NOT NULL COMMENT 'branch id', | |||
`action_name` VARCHAR(64) NOT NULL COMMENT 'action name', | |||
`status` TINYINT NOT NULL COMMENT 'status(tried:1;committed:2;rollbacked:3;suspended:4)', | |||
`application_data` varchar(2000) DEFAULT NULL COMMENT 'the application context', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
启动的时候建议select * 这个表,看看有没有application_data列,没有的话要默认为tc存储方式
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
既然用户主动设置了fence存储,说明用户是有主观意愿要切换存储的,这时候如果没有字段属于用户自身的遗漏,应该把异常抛给用户保证其第一时间发现问题。
tcc/src/main/java/io/seata/rm/tcc/context/FenceLogContextStoreManager.java
Outdated
Show resolved
Hide resolved
tcc/src/main/java/io/seata/rm/tcc/context/FenceLogContextStoreManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要将多次report的数据合并写入fence表或tc,并且需要限制次数
ec62718
to
9fbcb3b
Compare
fc5717e
to
9cc7d4e
Compare
9cc7d4e
to
c16f319
Compare
Ⅰ. Describe what this PR did
添加TCC上下文存储SPI扩展能力,并扩展实现将TCC的actionContext数据存储到本地防悬挂表中。
目前TCC在方悬挂情况下,如果一阶段有三方接口调用,TCC无法进入二阶段回滚。该类问题可以参阅#4532
oldPr: #4527
Ⅱ. Does this pull request fix one issue?
fixes #4423
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews