-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
optimize: modify the deletion mechanism of the tcc_fence_log table #3994
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3994 +/- ##
==========================================
Coverage 49.91% 49.91%
- Complexity 3767 3770 +3
==========================================
Files 698 697 -1
Lines 23509 23513 +4
Branches 2910 2908 -2
==========================================
+ Hits 11735 11737 +2
Misses 10593 10593
- Partials 1181 1183 +2
|
...t/src/main/java/io/seata/spring/boot/autoconfigure/properties/client/TccFenceProperties.java
Outdated
Show resolved
Hide resolved
spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java
Outdated
Show resolved
Hide resolved
spring/src/main/java/io/seata/spring/util/TCCBeanParserUtils.java
Outdated
Show resolved
Hide resolved
spring/src/main/java/io/seata/spring/util/TCCBeanParserUtils.java
Outdated
Show resolved
Hide resolved
spring/src/main/java/io/seata/spring/util/TCCBeanParserUtils.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.
使用 java.time.Duration/java.time.Period 代替自己解析会不会更好一点?
spring/src/main/java/io/seata/spring/annotation/GlobalTransactionScanner.java
Show resolved
Hide resolved
spring/src/main/java/io/seata/spring/util/TCCBeanParserUtils.java
Outdated
Show resolved
Hide resolved
@caohdgege 把 |
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.
LGTM
...toconfigure-client/src/main/resources/META-INF/additional-spring-configuration-metadata.json
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.
LGTM
Ⅰ. Describe what this PR did
目前
TCCFenceConfig
配置初始化和删除tcc_fence_log
表的定时任务由配置文件中的一个开关控制,现优化为:如果用户开启 TCC 防悬挂功能,则自动开启初始化配置和开启删除的定时任务Ⅱ. Does this pull request fix one issue?
fixes #3807
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
主要实现逻辑是在
GlobalTransactionScanner#wrapIfNecessary()
调用的TCCBeanParserUtils#isTccAutoProxy()
方法中。在判断isTccProxyTargetBean()
时,判断是否开启了TwoPhaseBusinessAction.useTCCFence
,如果是则初始化TCCFenceConfig
配置类,开启自动清理的定时任务