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

Enable job discard, exporter stub, context cancel bug #56

Merged
merged 18 commits into from
Apr 16, 2024

Conversation

mikejholly
Copy link
Contributor

@mikejholly mikejholly commented Apr 11, 2024

@mikejholly mikejholly changed the title Enable job discard, exporter stub Enable job discard, exporter stub, context cancel bug Apr 16, 2024
@mikejholly mikejholly marked this pull request as ready for review April 16, 2024 18:47
@mikejholly mikejholly requested a review from alexcb April 16, 2024 18:47

for {
select {
case <-ctx.Done():
Copy link
Contributor

Choose a reason for hiding this comment

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

nice addition!

solver/simple.go Outdated
s.solver.mu.RUnlock()
return st
}
s.solver.mu.RUnlock()
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be done after the call to createState returns? because createState will add the entry into s.solver.actives.

otherwise this feels like a race-condition where two threads both call state and both end up with a key miss.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's correct. There's a lock around the actives write on L186, but I think you're right about the race after L145. Will update.

@mikejholly mikejholly requested a review from alexcb April 16, 2024 21:43
@mikejholly mikejholly merged commit 7c4fb13 into earthly-next Apr 16, 2024
26 of 51 checks passed
@mikejholly mikejholly deleted the mh/next-cache-export branch April 16, 2024 21:50
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