-
Notifications
You must be signed in to change notification settings - Fork 566
Always Write Job Cache Metadata for Jobs (So We Know When to Respect cache-write and cache-read) #10353
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
Conversation
4988ff6
to
0fd1990
Compare
size-limit report 📦
|
@@ -42,14 +42,13 @@ func createPJSSchema(ctx context.Context, env migrations.Env) error { | |||
); | |||
-- PJS has a server side cache for jobs. Utilizing this cache allows PJS to skip subtrees when spawning job trees. | |||
CREATE TABLE pjs.job_cache ( | |||
job_hash BYTEA NOT NULL, | |||
job_id BIGINT REFERENCES pjs.jobs(id) ON DELETE CASCADE, | |||
job_id BIGINT REFERENCES pjs.jobs(id) ON DELETE CASCADE PRIMARY KEY, |
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.
A stub necessitates that we may write an entry to this table without the job hash being there.
0fd1990
to
229778b
Compare
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.
I mostly checked code styles and it is great work. I want to re-review given more understanding.
src/internal/pjsdb/job_cache.go
Outdated
`, job.ID, job.ReadEnabled, job.WriteEnabled) | ||
} | ||
|
||
// a full write is only done on a cache hit. |
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.
I just reviewed a PR of Bob's static check of comments. The comments would be better starts with "writeToJobCache" does something (to pass the checks) 😀 . Same applies to other functions.
…hen cache-write=false.
229778b
to
c8e1bc3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10353 +/- ##
==========================================
- Coverage 62.15% 62.14% -0.01%
==========================================
Files 1218 1218
Lines 87602 87619 +17
Branches 1820 1820
==========================================
+ Hits 54448 54453 +5
- Misses 32314 32333 +19
+ Partials 840 833 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
No description provided.