-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
optimize: replace Random by ThreadLocalRandom in RandomLoadBalance #2573
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2573 +/- ##
==========================================
Coverage 51.03% 51.04%
- Complexity 2804 2806 +2
==========================================
Files 554 554
Lines 17756 17755 -1
Branches 2062 2062
==========================================
+ Hits 9062 9063 +1
Misses 7812 7812
+ Partials 882 880 -2
|
please help to see if other classes need to be processed |
Already checked, no more classes need to be processed. |
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.
please try again for ci @slievrly |
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
ThreadLocalRandom will achieve less contention.
Replace Random by ThreadLocalRandom in RandomLoadBalance,refer to the implement of RandomLoadBalance in dubbo.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
test case LoadBalanceTest already exist.
Ⅳ. Describe how to verify it
test case LoadBalanceTest already exist.
Ⅴ. Special notes for reviews