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
Closing an index right after it has been creating leaves it in an unopenable state #3313
Comments
Confirmed, this is indeed the case. There is simple workaround for this issue though - just make sure that the index gets to at least to yellow state before trying to close it. I am curious is there a particular use case that led to this being a problem? |
On Sun, Jul 14, 2013 at 1:18 PM, Igor Motov notifications@github.comwrote:
I was building a script that can build an index from scratch as well as Are there other non-index-creation cases that put the index in this state? Nik |
@imotov I believe as you mentioned that we can really open an index only after all the primary shards have been allocation at least once. This is because we can't recreate the I suggest that a simple fix for now is to reject a close index request if one of its index shard routing info has the primaryAllocatedPostApi set to false. |
While working on a patch for the issue kimchy mentioned I noticed a look alike issue: https://gist.github.com/nik9000/6028478 I'll post another github issue after some more investigation. |
Hi @nik9000. Thanks for the PR. I am just thinking maybe we can remove I looked at the related problem with quorum as well. Not really sure what we should do about it. Should we even allow creation of an index with 3 replicas and |
On Fri, Jul 19, 2013 at 8:14 PM, Igor Motov notifications@github.comwrote:
Thanks for taking the time to read it!
As to the 128 shards it was just a number that seemed to trigger the
What about the case where when you create the index everything makes sense
|
I could work the test so it used a small number of shards and just tried On Fri, Jul 19, 2013 at 8:51 PM, Nikolas Everett nik9000@gmail.com wrote:
|
Interesting, I was able to consistently reproduce it with 10 shards (and even 5 in most cases), hence the suggested number. I was thinking about retrying logic as well, but you would still need to remove assertRed() to remove race condition between checking index health and closing the index and then do clean up of index that failed to create the issue. |
I've updated the pull request with a retry logic and it looks like I can Nik On Fri, Jul 19, 2013 at 9:04 PM, Igor Motov notifications@github.comwrote:
|
Closing an index right after it has been creating leaves it in an unopenable state. Specifically, opening the index results in a bunch of shards being unassigned and not getting assigned automatically. Reproduction curl commands ready to pase into a shell: https://gist.github.com/nik9000/5970277
The text was updated successfully, but these errors were encountered: