-
Notifications
You must be signed in to change notification settings - Fork 195
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
Functionality to fix a Corrupted ElasticSearch Index #1048
Comments
During the testing it turned out that the Index Corruption usually happens when a beginning test is interrupted forcefully:
Interrupting the Indexation Sequence can easily produce a corrupted index. |
Interrupting the
|
@bodo-hugo-barwich where are we at on this? |
As documented in this task an index corruption can easily happen in the development process.
Alternatively exists also a
but also this procedure requires that the developer already knows that the cause is the corrupted index and that he needs to delete the wrongly created The suggestion was to introduce a simplified command like:
But in the conversation on the development at: Alternatively another approach could also be:
But I'm not sure if this is an actual need of the development team. |
I think the main concern is that we don't want to add any flags to destroy the index which would accidentally be passed through to a production instance. I'm fine with making it easier to recover from a corrupted Elasticsearch in the developer environment as long as it's restricted to that environment. |
Is there a way to reliably detect an index has been corrupted? |
During the development I saw that an index can corrupt within the ElasticSearch Engine when the indexation process is canceled unexpectedly. Then the index shows with Health State red within the ElasticSearch Engine. Now, this task on hand aims to remove any wrongly built indices to break this doom loop. |
I understand there are different ways for the data or index to be in a useless or wrong state. I'm asking if there's a way to reliably detect any or all of them, partly so the tests could immediately bail out in that instance. It was a simple yes/no question, and I don't understand a yes or no from this yet :-) |
Yes, you can check the current index structure against a desired index structure. Right now there is a test in This test gives a 98% certainty that the ElasticSearch infrastructure is correct. (2% that are not covered are changes of the intern index fields.) This kind of check does also the So, when the Still the test |
I understand this requirement as that the application needs to be aware of its environment where it runs in. An Environment Variable could provide this information and only allow the |
I'd like to see something like an |
From the technical side the But from the operational view point this will be an expensive revision which when abused can result into a noticeable slow down.
Due to this concern a light weight quick check was implemented in So, the Full Check could be an additional functionality to be used at certain points within the installation process. |
I saw in the code that the environment variables
|
The
|
When the interactive mode is off this will not occur and the operation will proceed.
When the interactive mode is off any intent to write to the terminal will produce an exception in the application so there is no other way to handle this. |
@mohawk2
and also differences between the mappings definition and the actually deployed mappings.
which can be seen in the test report:
this will give a 100% security that the deployed mappings match exactly the definitions in the project and any changes in the ElacticSearch Engine will become evident. |
A quick look at the PR looks really good. I feel like the |
According to your suggestion I removed the now unused |
As documented at
MetaCPAN API - Indexing failed
ElasticSearch indices could result corrupted for different reasons.
Often they can be fixed by re-creating the index.
But as seen in the development at
ElasticSearch Availabilty Check and Mapping Self-Check
there are still a lot of open questions about how to implement it exactly.
The text was updated successfully, but these errors were encountered: