-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
feat(apollo-client): the spi of config service load balancer client #4394
feat(apollo-client): the spi of config service load balancer client #4394
Conversation
todo:
|
Should update the version of project before this pr merge? Line 63 in 40772c4
|
Codecov Report
@@ Coverage Diff @@
## master #4394 +/- ##
=========================================
Coverage 53.20% 53.20%
- Complexity 2677 2681 +4
=========================================
Files 489 490 +1
Lines 15291 15300 +9
Branches 1585 1586 +1
=========================================
+ Hits 8135 8141 +6
- Misses 6602 6604 +2
- Partials 554 555 +1
Continue to review full report at Codecov.
|
Right, we could merge this pr once 2.0.1 is released. |
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
As 2.1.0 is released, please rebase the code and also update the CHANGES.md. |
...ent/src/main/java/com/ctrip/framework/apollo/spi/DefaultConfigServiceLoadBalancerClient.java
Outdated
Show resolved
Hide resolved
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.
BTW, is it necessary to also update the lb logic in RemoteConfigRepository?
Co-authored-by: Jason Song <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-authored-by: Jason Song <[email protected]>
According the code apollo/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java Lines 201 to 210 in 2cc9fc8
all ConfigServices will be accessed. if we use random strategy to instead of it, maybe lose the |
@Anilople Actually it's a random strategy to access the config service until some config service returns the config. So it won't access all config services unless every attempts to get the config fails. However, I think it may not be that necessary to customize its logic as it is only triggered when the config changes. So it is OK now. |
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
What's the purpose of this PR
Let user can custom load balancer client of how to choose
config service
by spi.Which issue(s) this PR fixes:
Fixes #3225
Brief changelog
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.