-
Notifications
You must be signed in to change notification settings - Fork 797
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
pkg/xds/v2: add StreamClientMutex. #885
Conversation
`=` assignment is not atomic in golang and partial assignments that may occur probabilistically. `ADSClient.StreamClient` are both read/written in two goroutinues, so adding `mutex` to guarantee concurrent security.
Travis ci failed, but it seems that doesn't involve my modification. |
Codecov Report
@@ Coverage Diff @@
## stable #885 +/- ##
==========================================
- Coverage 55.76% 55.76% -0.01%
==========================================
Files 234 234
Lines 23771 23790 +19
==========================================
+ Hits 13257 13267 +10
- Misses 9309 9315 +6
- Partials 1205 1208 +3
Continue to review full report at Codecov.
|
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.
approve
Codecov Report
@@ Coverage Diff @@
## master #885 +/- ##
==========================================
- Coverage 55.66% 55.63% -0.03%
==========================================
Files 234 234
Lines 23794 23802 +8
==========================================
- Hits 13244 13243 -1
- Misses 9336 9346 +10
+ Partials 1214 1213 -1
Continue to review full report at Codecov.
|
=
assignment is not atomic in golang and partial assignments that mayoccur probabilistically.
ADSClient.StreamClient
are both read/writtenin two goroutinues, so adding
mutex
to guarantee concurrent security.Issues associated with this PR
No.
Sign the CLA
Done.
Solutions
=
assignment is not atomic in golang and partial assignments that mayoccur probabilistically.
ADSClient.StreamClient
are both read/writtenin two goroutinues, so adding
mutex
to guarantee concurrent security.UT result
Probabilistically and theoretically.
Benchmark
Not involve.
Code Style
Goimports
has runDone in goland.
Golint
resultPrint nothing.