You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Eureka watcher misses same-instance metadata updates because equality compares only identity #7439
Netflix Eureka InstanceInfo.equals() compares identity rather than all instance properties. For an instance retaining its identity, changes to upstream-relevant data do not satisfy the update predicate. The addition/deletion checks also see the instance as unchanged, so no event is emitted.
Expected Behavior
A stable instance identity with changed upstream information should emit ChangedEventListener.Event.UPDATED and refresh the gateway's upstream data.
Steps To Reproduce
Create two real Eureka InstanceInfo snapshots with the same explicit instance ID, application, address and port.
Set the old snapshot's metadata.weight to 10 and the new snapshot's weight to 20.
Compare the snapshots through EurekaInstanceRegisterRepository.compareInstances().
Observe that no UPDATED event is delivered although buildUpstreamJsonFromInstance() would generate different weight data.
Use real InstanceInfo objects in the regression so the dependency's identity-based equality is exercised; a plain Mockito mock uses different equality semantics.
Environment
ShenYu 2.7.2-SNAPSHOT, master at 67596c1d228b62da75cd0a0ecb47d0ac5d995384, Eureka instance discovery.
Severity: Medium. Confidence: high. In-place changes to weight, protocol, props and other upstream fields can leave ShenYu discovery data stale despite successful ongoing polling. This report does not assume every Eureka status change remains present in the upstream fetch result.
Suggested Fix And Regression Coverage
Match snapshots by stable identity, then compare the upstream-relevant fields or their generated upstream representation. Preserve distinct ADDED and DELETED handling. Test same-ID weight/protocol/props changes using real dependency objects and assert an UPDATED event with the new payload.
Validation And Related Issues
Existing Eureka module tests passed 3 tests with zero failures, but do not cover real same-ID mutable-field comparison. No live Eureka cluster was started.
Independent verification inspected the actual Eureka 2.0.2 dependency source and reproduced identity equality with two real InstanceInfo snapshots having the same ID but different metadata/status: equality remains true and hashes match.
#6500/#7429 address keeping the polling task alive after errors. #6904 concerns namespace filtering. This is the separate update-detection predicate used by otherwise successful polls.
Activity
github-actions commentedon Oct 6, 2026
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏