-
Notifications
You must be signed in to change notification settings - Fork 78
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
[patch] change gateway vald's mutex lock #765
[patch] change gateway vald's mutex lock #765
Conversation
Signed-off-by: kpango <[email protected]>
[CHATOPS:HELP] ChatOps commands.
|
case pos == len(res.GetResults())-1: | ||
res.Results = append(res.GetResults(), dist) | ||
case pos >= 0: | ||
res.Results = append(res.GetResults()[:pos+1], res.GetResults()[pos:]...) |
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.
[golangci] reported by reviewdog 🐶
appendAssign: append result not assigned to the same slice (gocritic)
break | ||
} | ||
} | ||
switch { |
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.
[golangci] reported by reviewdog 🐶
anonymous switch statements should never be cuddled (wsl)
for idx := pos; idx >= 1; idx-- { | ||
if res.GetResults()[idx-1].GetDistance() <= dist.GetDistance() { | ||
pos = idx - 1 | ||
break |
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.
[golangci] reported by reviewdog 🐶
break with no blank line before (nlreturn)
Codecov Report
@@ Coverage Diff @@
## master #765 +/- ##
==========================================
+ Coverage 16.72% 16.92% +0.20%
==========================================
Files 420 421 +1
Lines 19476 19528 +52
==========================================
+ Hits 3258 3306 +48
Misses 15997 15997
- Partials 221 225 +4
Continue to review full report at Codecov.
|
0060b50
to
9183b07
Compare
Signed-off-by: kpango <[email protected]>
9183b07
to
f9373fb
Compare
Signed-off-by: kpango <[email protected]>
90498a9
to
0cc6113
Compare
Co-authored-by: Rintaro Okamura <[email protected]>
@rinx commit suggestion |
Thanks! it became understandable code. 👍 |
kmrmt's review we don't need to fix it. I'll merge this PR |
Signed-off-by: kpango [email protected]
Description:
replace sync.Mutex lock map using sync.Map CAS operation
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: