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

fix: jobsDB backup query time #2521

Merged
merged 3 commits into from
Oct 28, 2022
Merged

fix: jobsDB backup query time #2521

merged 3 commits into from
Oct 28, 2022

Conversation

saurav-malani
Copy link
Contributor

Description

currently, we see pre_drop table pileup if a lot of jobs are failing. Since, we have a limit on number of rows read at a time to 1000 (by default). And, when failure is high we have a lot of columns in status table. Because of while taking backup of a single table requires querying DB a lot of time, which takes really really long time.

So, to avoid this, we are setting the default value of LIMIT to a large value 100,000 since, we are already guarded by running_payload_size, to avoid OOM kill.

Notion Ticket

https://www.notion.so/rudderstacks/remove-LIMIT-on-row-count-from-getBackUpQuery-bde1f44331d444f7a33e3b3f99904470

@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Base: 43.93% // Head: 44.04% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (c3aa37f) compared to base (4fe3038).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2521      +/-   ##
==========================================
+ Coverage   43.93%   44.04%   +0.10%     
==========================================
  Files         187      187              
  Lines       39114    39255     +141     
==========================================
+ Hits        17186    17290     +104     
- Misses      20840    20862      +22     
- Partials     1088     1103      +15     
Impacted Files Coverage Δ
jobsdb/jobsdb.go 65.44% <100.00%> (-2.30%) ⬇️
enterprise/suppress-user/suppressUser.go 79.26% <0.00%> (-3.45%) ⬇️
jobsdb/setup.go 90.47% <0.00%> (-0.44%) ⬇️
warehouse/upload.go 18.55% <0.00%> (-0.13%) ⬇️
router/router.go 67.73% <0.00%> (-0.03%) ⬇️
warehouse/identities.go 1.04% <0.00%> (-0.01%) ⬇️
warehouse/slave.go 1.08% <0.00%> (-0.01%) ⬇️
warehouse/api.go 70.41% <0.00%> (ø)
utils/misc/dbutils.go 0.00% <0.00%> (ø)
... and 19 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

jobsdb/jobsdb.go Outdated Show resolved Hide resolved
jobsdb/jobsdb.go Outdated Show resolved Hide resolved
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.

4 participants