-
Notifications
You must be signed in to change notification settings - Fork 59
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
Conversation
Codecov ReportAttention: Patch coverage is
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. 🚨 Try these New Features:
|
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.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.
LGTM, please get Yang's approval too.
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.java
Outdated
Show resolved
Hide resolved
dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalRelationshipWriterDAO.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.
LGTM! Thanks for making the changes to keep our db safe
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