spring-cloud / spring-cloud/spring-cloud-netflix

Duplicate event: EurekaInstanceCanceledEvent

Open
#4,140 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
5k
Forks
2.5k
Avg merge
1d 2h
Merged PRs (30d)
10

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the REST unregister endpoint and trace the cancellation path through the overridden cancel and internalCancel methods, focusing on where handleCancelation is invoked. Verify that removing the duplicate invocation leaves EurekaInstanceCanceledEvent emitted once; done means an active unregister produces a single event.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.