Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

409 Conflict Response does not send the InstanceInfo back to the client #933

Closed
jebeaudet opened this issue Apr 21, 2017 · 1 comment
Closed

Comments

@jebeaudet
Copy link
Contributor

jebeaudet commented Apr 21, 2017

In InstanceResource, when renewing a lease and lastDirtyTimestamp is not null, the code will return a 409 Conflict to the client in a certain situation. However, PeerReplicationResource will not return the InstanceInfo in the body of the response unless the status code is 200.

On the client side of things, PeerEurekaNode needs this InstanceInfo to execute the method syncInstancesIfTimestampDiffers. Since it's never sent back from the server, this code never gets executed and you get The replication of task XXX/i-XXX@XXX failed with response code 409 logs until you fix it manually.

PR submitted.

jebeaudet added a commit to jebeaudet/eureka that referenced this issue Apr 21, 2017
When the server receive a heartbeat from a peer with a lastDirtyTimestamp lower
than the timestamp it has, it will return a 409 Conflict response code. On the
client side, it will use this status code to trigger a resync on this particular
instance.

The PeerReplicationResource was however stripping the required InstanceInfo
from the response unless the status code was a 200 which is not the case here.
This simple fix adds the InstanceInfo to the response in case of 409.

Fixes Netflixgh-933
@jebeaudet
Copy link
Contributor Author

Sorry for the amended commits noise :)

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

No branches or pull requests

1 participant