-
Notifications
You must be signed in to change notification settings - Fork 44
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
Race condition during startup fix #502
Race condition during startup fix #502
Conversation
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.
Why there are changes related to bash completion in this PR?
082ac77
to
ff11e56
Compare
func transactionCommitInformer() chan int { | ||
mutex.Lock() |
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.
prefer sync.Once (cf. https://github.com/cloudwan/gohan/pull/503/files)
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.
@p-kozlowski Done
ff11e56
to
70c2f20
Compare
@przemyslaw-dobrowolski-cl please review again |
var transactionCommited chan int | ||
var ( | ||
transactionCommited chan int | ||
wasCommited sync.Once |
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.
What was commited? this name is not self-explaining. Please rename this to something more meaningful, like transactionCommitedOnce or similar
@andriikonstantinov Can you provide a proof for this race condition? eg. stack trace? |
70c2f20
to
4e06303
Compare
@andriikonstantinov Could you cite any stack trace for this face condition? |
@andriikonstantinov please rebase |
@przemyslaw-dobrowolski-cl this issue hasn't been observed, it was found by code analysis: #358 |
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.
Please rebase.
ca15f9a
to
0acb6d0
Compare
please rebase |
c2d923a
to
ad9bf0a
Compare
#358