-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Change to use shouldFetchRegistry
.
#3627
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3627 +/- ##
=========================================
Coverage 65.04% 65.04%
Complexity 1508 1508
=========================================
Files 191 191
Lines 7286 7286
Branches 871 871
=========================================
Hits 4739 4739
Misses 2236 2236
Partials 311 311
Continue to review full report at Codecov.
|
2 similar comments
Codecov Report
@@ Coverage Diff @@
## master #3627 +/- ##
=========================================
Coverage 65.04% 65.04%
Complexity 1508 1508
=========================================
Files 191 191
Lines 7286 7286
Branches 871 871
=========================================
Hits 4739 4739
Misses 2236 2236
Partials 311 311
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3627 +/- ##
=========================================
Coverage 65.04% 65.04%
Complexity 1508 1508
=========================================
Files 191 191
Lines 7286 7286
Branches 871 871
=========================================
Hits 4739 4739
Misses 2236 2236
Partials 311 311
Continue to review full report at Codecov.
|
I think that makes sense. Is there a way to test this change? |
When I have two nodes to form a eurekaServer cluster,
If I set
eureka.client.fetch-registry=false
andeureka.client.register-with-eureka=true
,then
eurekaClient
inside the eurekaServer will never fetch registry from another eurekaServer upon startup.Refer to
PeerAwareInstanceRegistryImpl.syncUp
:Because
eureka.client.fetch-registry=false
,eurekaClient.getApplications().getRegisteredApplications()
here will always be empty, so wait for 5 times here is meaningless. soclientConfig.shouldRegisterWithEureka()
should be changed to useclientConfig.shouldFetchRegistry()
just as what this PR shows.