spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

Improve EurekaConfigServerInstanceProvider #4267

Closed Puppy4C closed 6 months ago

Puppy4C commented 7 months ago

The parameter regions in theclient.getApplications() method represents remoteRegions, which indicates that the registry should not only retrieve and return a list of its own nodes, but also return a list of remoteRegions.

But config.getRegion() represents the local region, and if this parameter is included, the registry will continue to print: No remote registry available for the remote region xxx

We should refer to com.netflix.discovery.DiscoveryClient#getAndStoreFullRegistry and use config.fetchRegistryForRemoteRegions() instead of it

Puppy4C commented 6 months ago

Hi @OlgaMaciaszek ,I have fixed the tests and updated the license comment,please review.