-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
|
||
for { | ||
select { | ||
case <-ctx.Done(): |
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.
nice addition!
solver/simple.go
Outdated
s.solver.mu.RUnlock() | ||
return st | ||
} | ||
s.solver.mu.RUnlock() |
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.
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.
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 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.
Tests with this version: https://github.com/earthly/earthly/actions/runs/8694146966/job/23851036433?pr=3987