Skip to content

Fix: differentiate ADDED and MODIFIED instance actions (#1602)#1604

Open
souvikree wants to merge 1 commit intoNetflix:masterfrom
souvikree:fix-action-handling#issue-1602
Open

Fix: differentiate ADDED and MODIFIED instance actions (#1602)#1604
souvikree wants to merge 1 commit intoNetflix:masterfrom
souvikree:fix-action-handling#issue-1602

Conversation

@souvikree
Copy link

Summary

This PR fixes Issue #1602 where the ADDED and MODIFIED actions in Eureka delta updates performed the same logic.

Problem

Both ADDED and MODIFIED were calling addInstance(), which made them behave identically. Because of this, Eureka couldn’t properly tell the difference between a new instance being registered and an existing instance being updated.

Changes Made

  • Updated the logic in DiscoveryClient.java so MODIFIED now updates the existing instance instead of re-adding it.
  • The updated instance now refreshes its status and metadata safely.
  • Added a small null check before merging metadata to avoid issues.

Result

With this change, It can now correctly distinguish between newly added instances and modified ones during delta processing.

Tested by building successfully on JDK 8 and verifying no compile or integration issues.

@souvikree
Copy link
Author

I have submitted a PR (#1604) that fixes this issue by differentiating between ADDED and MODIFIED actions in DiscoveryClient.
Please review when you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant