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

Optimizied soft delete relationship query by batching #468

Merged
merged 16 commits into from
Nov 25, 2024
Merged

Conversation

rakhiagr
Copy link
Contributor

@rakhiagr rakhiagr commented Nov 6, 2024

Summary

Recently, it has been observed that the soft delete relationship query in the EbeanLocalRelationshipWriterDAO class is not optimized and run into performance issues when soft deleting a large number of rows.

Now, we are limiting the batch size to 10000 and completing the transaction for every 10000 statements for soft delete relationship query.

Testing Done

mint build

Checklist

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 39.53488% with 26 lines in your changes missing coverage. Please review.

Project coverage is 66.15%. Comparing base (8ccc25e) to head (6851f14).

Files with missing lines Patch % Lines
.../metadata/dao/EbeanLocalRelationshipWriterDAO.java 39.53% 20 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #468      +/-   ##
============================================
- Coverage     66.35%   66.15%   -0.20%     
- Complexity     1523     1526       +3     
============================================
  Files           137      137              
  Lines          5849     5889      +40     
  Branches        642      649       +7     
============================================
+ Hits           3881     3896      +15     
- Misses         1693     1713      +20     
- Partials        275      280       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@jsdonn jsdonn left a comment

Choose a reason for hiding this comment

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

LGTM, please get Yang's approval too.

Copy link
Contributor

@jsdonn jsdonn left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making the changes to keep our db safe

@rakhiagr rakhiagr merged commit fd38c99 into master Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants