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
Restore snapshot leaves shards unassigned and with CorruptIndexException #9275
Comments
I double checked with version 1.4.2 and a cluster of 2 instances. These fail as well. |
Hi @richtmat Were these indices created on 1.4.0 originally? Or an earlier version? It looks like the files have been truncated, but I'm unsure whether it is the snapshot that contains the truncated files, or whether they're being truncated during the restore. |
@clintongormley, yes, I started taking snapshots with 1.4.0 and could not restore them with 1.4.0. Same with snapshot and restore with 1.4.2 . |
@richtmat what type of repository are you using and how is it configured? |
@imotov it's |
Hi @richtmat, We think this is most likely an issue with azure plugin. But to make sure, I'd like to reproduce your issue. Thanks! |
Hi @dadoonet, that is easy, it is the simple example from the plugin:
I reproduced on the same cluster. I tried a single dev machine before and that was not working. If it is of any help, this machine is setup with the puppet module of elasticsearch. So on my dev machine it is a single instance running. Thank you. |
Could you tell me more about the amount of data that has been backed up? Is it some Mb? Gb? |
Probably about 5MB of test data. |
Ok. Small then. One more question, is this failing for all indices or only with a single one? |
Both indices fail. |
@dadoonet can I assist you any more on that issue? |
@richtmat I wonder if something went wrong when you snapshotted your index. Any chance you could try to snapshot again the same data on Azure and then restore? If you can reproduce it, would it be possible for you to snapshot you index using the default shared FS, restore and see where is goes? And send me an email with the link at david.pilato (at) elasticsearch (dot) com? |
@dadoonet I sent you the link via email. |
Thanks @richtmat It sounds like you are using https://github.com/yakaz/elasticsearch-analysis-combo, right? |
@dadoonet yes I do. |
And the https://github.com/elasticsearch/elasticsearch-mapper-attachments as well? Could you give me the full list of plugins you have?
|
|
That's really interesting. I can reproduce an issue which is not exactly the one you are describing but I guess it could be the same cause. Here is what I did:
Each time I'm trying the same operation, I'm getting this error:
When checking in azure console, I can see that blob I'm going to try to reproduce this with the most recent changes in cloud-azure plugin. |
I tried the same this morning with elasticsearch My suspicion about the initial issue is that something was incorrect at snapshot time but we somehow swallow the exception thrown by Azure instead of failing the Snapshot or doing a retry. While debugging that, I found some bugs in the way we currently do Snapshot and Restore in Azure plugin, so I'll fix issues I found so far. For example, when you remove a container from Azure console, even if Azure told you that it has been done, it appears to be an asynchronous deletion so you can hit error like We can close this issue in elasticsearch core now and follow up the discussion in Azure plugin: elastic/elasticsearch-cloud-azure#51 |
I'm doing a snapshot on a regular basis which just works fine. But when restoring these snapshots some shards fail:
and the log has some CorruptIndexExceptions:
I have done successful restores before, though. I'm on elasticsearch 1.4.0 .
The text was updated successfully, but these errors were encountered: