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: add tcc fence log clean task delay check #5089
optimize: add tcc fence log clean task delay check #5089
Conversation
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
@@ -109,6 +109,10 @@ public void setLogTableName(String logTableName) { | |||
*/ | |||
public void initCleanTask() { | |||
try { | |||
// disable clear task when cleanPeriod <= 0 | |||
if (cleanPeriod.isZero() || cleanPeriod.isNegative()) { | |||
return; |
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.
添加个info日志吧。提示一下。
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## develop #5089 +/- ##
=============================================
- Coverage 48.48% 48.47% -0.01%
+ Complexity 4139 4138 -1
=============================================
Files 743 743
Lines 26520 26523 +3
Branches 3294 3295 +1
=============================================
Hits 12857 12857
- Misses 12264 12267 +3
Partials 1399 1399
|
麻烦将pr的登记转到2.0.0的md中,该pr将合并到2.x分支 |
@a364176773 |
优化的,develop分支,另外提一个的吗? |
@wangliang181230 @a364176773 往 |
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
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
ScheduledThreadPoolExecutor#scheduleWithFixedDelay()
方法中,long delay
参数不能<=0
,否则会抛出异常。可以对cleanPeriod
做一个check
, 当值<=0
时,不启动clean task
定时任务Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews