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 : tccfence log table deleted should be optimized #4490

Merged
merged 18 commits into from
Aug 22, 2022

Conversation

Bughue
Copy link
Contributor

@Bughue Bughue commented Mar 23, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

  1. 先查出可以清理的数据
  2. 按索引删除数据
  3. 给delete加上limit

Ⅱ. Does this pull request fix one issue?

#4489

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2022

Codecov Report

Merging #4490 (5b5e506) into develop (e3a4640) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4490      +/-   ##
=============================================
- Coverage      49.12%   49.06%   -0.06%     
- Complexity      4095     4097       +2     
=============================================
  Files            737      737              
  Lines          25790    25827      +37     
  Branches        3189     3193       +4     
=============================================
+ Hits           12669    12672       +3     
- Misses         11772    11808      +36     
+ Partials        1349     1347       -2     
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% <0.00%> (ø)
...erver/storage/file/session/FileSessionManager.java 54.14% <0.00%> (+0.63%) ⬆️
...torage/file/store/FileTransactionStoreManager.java 56.91% <0.00%> (+0.64%) ⬆️

@Bughue Bughue changed the title tccfence log table should be deleted in batches tccfence log table deleted should be optimized Mar 29, 2022
@Bughue Bughue changed the title tccfence log table deleted should be optimized optimized : tccfence log table deleted should be optimized Mar 29, 2022
@Bughue Bughue changed the title optimized : tccfence log table deleted should be optimized optimize : tccfence log table deleted should be optimized Apr 2, 2022
@slievrly slievrly added the module/tcc tcc module label Apr 3, 2022
@funky-eyes funky-eyes added this to the 1.6.0 milestone Aug 5, 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

* The constant QUERY_END_STATUS_BY_DATE.
*/
protected static final String QUERY_END_STATUS_BY_DATE = "select xid, branch_id, status, gmt_create, gmt_modified "
+ "from " + LOCAL_TCC_LOG_PLACEHOLD
Copy link
Member

Choose a reason for hiding this comment

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

LGTM. Later Please submit a PR for Oracle and other databases

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

@luky116
Copy link

luky116 commented Nov 23, 2024

seata-go: apache/incubator-seata-go#699

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

Successfully merging this pull request may close these issues.

7 participants