spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Duplicate event: EurekaInstanceCanceledEvent

Open fanste opened this issue 2 years ago • 4 comments

Describe the bug An application that actively unregisters from eureka fires EurekaInstanceCanceledEvent twice. image

The REST endpoint for unregister is executed. The first event is fired, as handleCancelation was added directly to the overridden cancel method. The original cancel method delegates to internalCancel which again was overridden by spring and handleCancelation was added there too.

I think it should be save to remove the overridden cancel method and only keep internalCancel. WDYT?

fanste avatar Nov 25 '22 12:11 fanste

is it causing a problem?

spencergibb avatar Mar 04 '23 05:03 spencergibb

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues avatar Mar 11 '23 05:03 spring-cloud-issues

is it causing a problem?

You can workaround the duplicated event using an own collection to track the active instances. But it's not nice, that the event is fired twice.

fanste avatar Mar 13 '23 09:03 fanste

After tracking it, it appears to be a duplicate event caused by #1376.

  • https://github.com/spring-cloud/spring-cloud-netflix/issues/1376

I think this could be done with one of cancel and internalCancel removed. (Perhaps cancel?)

WDYT? 🤔

heowc avatar May 02 '24 15:05 heowc