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

Change IndexPrimaryShardNotAllocatedException from 409 to 500 #7632

Closed
clintongormley opened this issue Sep 7, 2014 · 4 comments
Closed

Comments

@clintongormley
Copy link

Currently the IndexPrimaryShardNotAllocatedException returns HTTP status code 409 (conflict) which is incorrect. It should be 500 (internal server error)

@clintongormley clintongormley added help wanted adoptme good first issue low hanging fruit labels Sep 7, 2014
reuben-sutton added a commit to reuben-sutton/elasticsearch that referenced this issue Oct 4, 2014
Change IndexPrimaryShardNotAllocatedException from 409 (RestStatus.CONFLICT) to 500 (RestStatus.INTERNAL_SERVER_ERROR)
@bleskes
Copy link
Contributor

bleskes commented Oct 6, 2014

imho this should be RestStatus#SERVICE_UNAVAILABLE (503)

@rjernst
Copy link
Member

rjernst commented Oct 6, 2014

+1 to using 503

@clintongormley
Copy link
Author

A 503 is used to signal to the clients that they should retry on another node. if the primary is not allocated, then retrying on another node won't help.

@bleskes
Copy link
Contributor

bleskes commented Oct 15, 2014

fair enough. I can't see a better alternative then. +1 on 500.

@tlrx tlrx self-assigned this Oct 17, 2014
tlrx added a commit to tlrx/elasticsearch that referenced this issue Oct 17, 2014
@tlrx tlrx removed their assignment Oct 19, 2014
bleskes pushed a commit that referenced this issue Oct 20, 2014
…NFLICT) to 500 (RestStatus.INTERNAL_SERVER_ERROR)

Closes #7632, Closes #7987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants