Skip to content

Fix initial Eureka instance replication delay - #4588

Open
yashdotdev13 wants to merge 2 commits into
spring-cloud:mainfrom
yashdotdev13:fix/4109-eureka-initial-replication-delay
Open

Fix initial Eureka instance replication delay#4588
yashdotdev13 wants to merge 2 commits into
spring-cloud:mainfrom
yashdotdev13:fix/4109-eureka-initial-replication-delay

Conversation

@yashdotdev13

Copy link
Copy Markdown
Contributor

Overview

Fixes an issue where the initial Eureka instance status update can trigger an
on-demand registration before the configured initial instance info replication
delay has elapsed.

Changes

  • Set the initial Eureka instance status before initializing the Eureka client.
  • Prevent the initial status change from triggering an immediate on-demand
    registration.
  • Added a regression test to verify that the initial status is set before
    Eureka client initialization.

Testing

  • ./mvnw.cmd -pl spring-cloud-netflix-eureka-client -Dtest=EurekaServiceRegistryTests test
  • ./mvnw.cmd -pl spring-cloud-netflix-eureka-client test

Results:

  • EurekaServiceRegistryTests: 6/6 passed
  • Eureka client module: 211/211 passed
  • Checkstyle: 0 violations

Related Issue

Fixes #4109

@yashdotdev13
yashdotdev13 force-pushed the fix/4109-eureka-initial-replication-delay branch from dea8624 to ee598b5 Compare August 19, 2026 17:27
@ryanjbaxter

Copy link
Copy Markdown
Contributor

Can you look into the failing PR build?

@yashdotdev13
yashdotdev13 force-pushed the fix/4109-eureka-initial-replication-delay branch from ee598b5 to c366a19 Compare September 3, 2026 23:14
@yashdotdev13

Copy link
Copy Markdown
Contributor Author

I looked into the failing build. The failure is occurring in the spring-cloud-netflix-eureka-client-tls-tests module, specifically during EurekaClientSuite setup. The test fails because the Eureka client cannot connect to the dynamically started local server (Connection refused).

The changes in this PR are limited to EurekaServiceRegistry and its tests, and the targeted EurekaServiceRegistryTests pass locally. I also reproduced the relevant upstream tests successfully on their own.

I’m continuing to investigate why the TLS test server is unavailable during the full CI build.

@ryanjbaxter

Copy link
Copy Markdown
Contributor

You can try and merge in main to your branch, but the CI build is passing fine
https://github.com/spring-cloud/spring-cloud-netflix/actions/runs/34174744571

@ryanjbaxter

Copy link
Copy Markdown
Contributor

If I build your branch locally the same tests fail for me. If I revert your change the tests pass, so it is something in your changes that broke the tests

@yashdotdev13
yashdotdev13 force-pushed the fix/4109-eureka-initial-replication-delay branch from ca8e944 to 06bdc68 Compare September 8, 2026 21:23
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
@yashdotdev13
yashdotdev13 force-pushed the fix/4109-eureka-initial-replication-delay branch from 06bdc68 to b0dbcd5 Compare September 8, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eureka.client.initial-instance-info-replication-interval-seconds with initial delay can not take effect bug

3 participants