-
Notifications
You must be signed in to change notification settings - Fork 13
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
copy transition state to prevent concurrency issue #382
Conversation
} | ||
|
||
func (db *cachingDB) SetActiveTransitionState(ts *TransitionState) { | ||
db.CurrentTransitionState = ts |
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.
Shouldn't we use a lock here?
Despite you tried making the assignment "more atomic" now (all fields at once), this still can have a race.
0211702
to
bb933ec
Compare
The giant lock approach works well enough, this would be considered an optimization. It doesn't make sense to work on it right now as many more changes are going to come in. I'll start again from scratch when needed. Adding a tag and closing. |
No description provided.