Skip to content

Conversation

FahadBSyed
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Sep 23, 2024

size-limit report 📦

Path Size
Entry 93.11 KB (0%)
Vendor XL 800.86 KB (0%)
Chunks 292.47 KB (0%)
Everything 1.16 MB (0%)

// GetJob returns a job by its JobID. GetJob should not be used to claim a job.
func GetJob(ctx context.Context, tx *pachsql.Tx, id JobID) (Job, error) {
ctx = pctx.Child(ctx, "getJob")
record := jobRecord{}
err := sqlx.GetContext(ctx, tx, &record, selectJobRecordPrefix+`
WHERE j.id = $1 GROUP BY j.id, jc.job_hash, jc.cache_write, jc.cache_read;`, id)
Copy link
Contributor

Choose a reason for hiding this comment

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

In my understanding, the ordering of group doesn't matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't, I just reordered it because read is generally before write (its read & write)

}
return Job{}, errors.Wrap(err, "get context")
}
log.Debug(ctx, "found job in the pjs job cache", zap.Uint64("job", uint64(record.ID)))
Copy link
Contributor

Choose a reason for hiding this comment

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

We should remove Debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, I added this intentionally so we can change the log mode to debug and confirm that the cache is being used.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 87.02290% with 17 lines in your changes missing coverage. Please review.

Project coverage is 62.33%. Comparing base (dd7ef8f) to head (908ff97).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/internal/pjsdb/job_cache.go 85.71% 8 Missing ⚠️
src/internal/pjsdb/job_crud.go 91.54% 6 Missing ⚠️
src/internal/pjsdb/errors.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10351      +/-   ##
==========================================
- Coverage   62.38%   62.33%   -0.05%     
==========================================
  Files        1217     1218       +1     
  Lines       87497    87608     +111     
  Branches     1820     1820              
==========================================
+ Hits        54581    54608      +27     
- Misses      32247    32334      +87     
+ Partials      669      666       -3     
Flag Coverage Δ
62.33% <87.02%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@FahadBSyed FahadBSyed merged commit bf7a823 into master Sep 24, 2024
26 checks passed
@FahadBSyed FahadBSyed deleted the MLDM-89-2 branch September 24, 2024 16:55
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.

2 participants