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

optimize: optimization after a unique index conflict occurs in tcc fence log #4303

Merged

Conversation

renliangyu857
Copy link
Contributor

@renliangyu857 renliangyu857 commented Jan 17, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

TCC 悬挂日志异步删除

Ⅱ. Does this pull request fix one issue?

fixes #3160

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes added this to the 1.5.0 milestone Jan 22, 2022
Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @wangliang181230 PTAL

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2022

Codecov Report

Merging #4303 (35a04df) into develop (09fa60c) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4303      +/-   ##
=============================================
- Coverage      48.59%   48.51%   -0.08%     
  Complexity      3865     3865              
=============================================
  Files            733      733              
  Lines          24756    24795      +39     
  Branches        3052     3054       +2     
=============================================
  Hits           12030    12030              
- Misses         11450    11489      +39     
  Partials        1276     1276              
Impacted Files Coverage Δ
...src/main/java/io/seata/rm/tcc/TCCFenceHandler.java 0.00% <0.00%> (ø)
...eata/rm/tcc/store/db/TCCFenceStoreDataBaseDAO.java 0.00% <0.00%> (ø)
...o/seata/rm/tcc/store/db/sql/TCCFenceStoreSqls.java 0.00% <ø> (ø)

Copy link
Contributor

@objcoding objcoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经有定时任务删除了,我感觉异步删除没太大必要。

@funky-eyes
Copy link
Contributor

已经有定时任务删除了,我感觉异步删除没太大必要。

定时任务是兜底作用,在原则上,这个fence记录起到作用后就应该被删除

@wangliang181230 wangliang181230 changed the title optimize:optimization after a unique index conflict occurs in tcc fen… optimize: optimization after a unique index conflict occurs in tcc fence log Jan 24, 2022
@wangliang181230
Copy link
Contributor

请修改下 1.5.0.md

Copy link
Contributor

@objcoding objcoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wangliang181230
Copy link
Contributor

wangliang181230 commented Jan 24, 2022

顺便改一下:
seata-spring-autoconfigure-client 模块下的 additional-spring-configuration-metadata.json 文件中:

{
  "name": "seata.tcc.fence.clean-period",
  "type": "java.time.Duration",
  "description": "TCC fence log clean period. only duration type format are supported.",
  "sourceType": "io.seata.rm.tcc.config.TCCFenceConfig",
  "defaultValue": "1h"
}

里的默认值 1h 改为 1d
#3994 中,默认值被修改过了。

@renliangyu857
Copy link
Contributor Author

renliangyu857 commented Jan 24, 2022

顺便改一下: seata-spring-autoconfigure-client 模块下的 additional-spring-configuration-metadata.json 文件中:

{
  "name": "seata.tcc.fence.clean-period",
  "type": "java.time.Duration",
  "description": "TCC fence log clean period. only duration type format are supported.",
  "sourceType": "io.seata.rm.tcc.config.TCCFenceConfig",
  "defaultValue": "1h"
}

里的默认值 1h 改为 1d
#3994 中,默认值被修改过了。

收到,下班回去修改md和配置

@lgtm-com
Copy link

lgtm-com bot commented Jan 24, 2022

This pull request introduces 1 alert and fixes 6 when merging 8576dbf0c028eafe80da22696d713f72dd1a8752 into d87e8c9 - view on LGTM.com

new alerts:

  • 1 for Potential database resource leak

fixed alerts:

  • 6 for Query built from user-controlled sources

@renliangyu857 renliangyu857 force-pushed the optimize_suspend_fencelog_conflict branch from 8576dbf to 534ae68 Compare January 24, 2022 16:19
@renliangyu857
Copy link
Contributor Author

顺便改一下: seata-spring-autoconfigure-client 模块下的 additional-spring-configuration-metadata.json 文件中:

{
  "name": "seata.tcc.fence.clean-period",
  "type": "java.time.Duration",
  "description": "TCC fence log clean period. only duration type format are supported.",
  "sourceType": "io.seata.rm.tcc.config.TCCFenceConfig",
  "defaultValue": "1h"
}

里的默认值 1h 改为 1d。 在 #3994 中,默认值被修改过了。

已提交,麻烦帮忙确认下

Copy link
Contributor

@wangliang181230 wangliang181230 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@funky-eyes funky-eyes merged commit ed2917d into apache:develop Jan 28, 2022
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimization after a unique index conflict occurs in undolog
6 participants