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

chore: avoid querying a dataset in case AfterJobID falls after said dataset #3478

Merged
merged 3 commits into from
Jun 15, 2023

Conversation

Sidddddarth
Copy link
Member

@Sidddddarth Sidddddarth commented Jun 10, 2023

Description

Avoid querying a dataset if params.AfterJobID != nil && *params.AfterJobID > dsRange.maxJobID.
Added said logic to jobsdb.GetProcessed(...) and jobsdb.GetUnprocessed(...)

Notion Ticket

update archive status

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

jobsdb/jobsdb.go Outdated Show resolved Hide resolved
jobsdb/jobsdb.go Outdated Show resolved Hide resolved
@Sidddddarth Sidddddarth force-pushed the chore.jobsdbAfterJobIDAvoidQuery branch from 7be75b2 to 36e72ea Compare June 13, 2023 12:58
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Patch coverage: 65.00% and project coverage change: -0.01 ⚠️

Comparison is base (5021989) 68.07% compared to head (8e9b622) 68.06%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3478      +/-   ##
==========================================
- Coverage   68.07%   68.06%   -0.01%     
==========================================
  Files         330      330              
  Lines       53577    53601      +24     
==========================================
+ Hits        36473    36484      +11     
- Misses      14713    14724      +11     
- Partials     2391     2393       +2     
Impacted Files Coverage Δ
jobsdb/jobsdb.go 72.78% <42.85%> (-0.08%) ⬇️
router/handle.go 73.85% <76.00%> (+0.64%) ⬆️
router/handle_lifecycle.go 94.40% <100.00%> (-0.98%) ⬇️

... and 7 files with indirect coverage changes

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

@Sidddddarth Sidddddarth marked this pull request as ready for review June 13, 2023 13:39
jobsdb/jobsdb.go Outdated Show resolved Hide resolved
@Sidddddarth Sidddddarth force-pushed the chore.jobsdbAfterJobIDAvoidQuery branch from f47c069 to fec3337 Compare June 14, 2023 02:29
jobsdb/jobsdb.go Show resolved Hide resolved
@Sidddddarth Sidddddarth force-pushed the chore.jobsdbAfterJobIDAvoidQuery branch from fec3337 to d318965 Compare June 14, 2023 09:47
@atzoum atzoum force-pushed the chore.jobsdbAfterJobIDAvoidQuery branch from d318965 to 34c4c07 Compare June 14, 2023 11:08
@atzoum atzoum force-pushed the chore.jobsdbAfterJobIDAvoidQuery branch from 34c4c07 to 8e9b622 Compare June 14, 2023 13:04
@Sidddddarth Sidddddarth merged commit f612aae into master Jun 15, 2023
38 checks passed
@Sidddddarth Sidddddarth deleted the chore.jobsdbAfterJobIDAvoidQuery branch June 15, 2023 00:36
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.

None yet

3 participants