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

fix(state): don't lock global state lock when adding a task log #356

Closed
wants to merge 1 commit into from

Conversation

benhoyt
Copy link
Contributor

@benhoyt benhoyt commented Feb 13, 2024

Sometimes the service manager has to write a task log, but there's a
3-way deadlock where another goroutine has held the state lock. Break
this cycle.

See #314 -- either this PR or #355 by itself will fix that issue.
I'm not sure about this PR. I like what it's trying to achieve, but it also
begs the question: why do we have this one special fine-grained lock
for the task log, and not for all the other fields?

Sometimes the service manager has to write a task log, but there's a
3-way deadlock where another goroutine has held the state lock. Break
this cycle.
@benhoyt
Copy link
Contributor Author

benhoyt commented Feb 13, 2024

Closing in favour of #359, which is much less invasive, and it seems a better approach to structure the locking better rather than do surgery to the state package.

@benhoyt benhoyt closed this Feb 13, 2024
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.

1 participant