-
Notifications
You must be signed in to change notification settings - Fork 810
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 data race in client and daemon #2168
Conversation
Signed-off-by: YangKeao <keao.yang@yahoo.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: YangKeao <keao.yang@yahoo.com>
/run-e2e-tests |
Signed-off-by: YangKeao <keao.yang@yahoo.com>
Signed-off-by: YangKeao <keao.yang@yahoo.com>
Codecov Report
@@ Coverage Diff @@
## master #2168 +/- ##
===========================================
- Coverage 55.78% 43.17% -12.61%
===========================================
Files 68 128 +60
Lines 4383 8854 +4471
===========================================
+ Hits 2445 3823 +1378
- Misses 1768 4703 +2935
- Partials 170 328 +158
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.
LGTM
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.
LGTM!
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 9a8a57d
|
does this PR need to be cherrypicked into release-2.0? @YangKeao |
cherry pick to release-2.0 in PR #2175 |
* fix data race in client and daemon Signed-off-by: YangKeao <keao.yang@yahoo.com> Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * fix test Signed-off-by: YangKeao <keao.yang@yahoo.com> Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * remove unused struct Signed-off-by: YangKeao <keao.yang@yahoo.com> Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * fix updated client test Signed-off-by: YangKeao <keao.yang@yahoo.com> Signed-off-by: YangKeao <yangkeao@chunibyo.icu> * add a sleep to give it time to sync the cache Signed-off-by: YangKeao <keao.yang@yahoo.com> Signed-off-by: YangKeao <yangkeao@chunibyo.icu> Co-authored-by: YangKeao <yangkeao@chunibyo.icu> Co-authored-by: YangKeao <keao.yang@yahoo.com>
Signed-off-by: YangKeao keao.yang@yahoo.com
What problem does this PR solve?
Fix two possible data race and add an
UpdatedStatusClient
:blockingBuffer
is full of data race while reading and writing at the same time.cache
could be the same one, and the reference stored in it will be simply copied out. RunDeepCopy
before assigning it to the new one.