-
Couldn't load subscription status.
- Fork 25.6k
Add recover_failure_document processor to restore failurestore docs to original form #133360
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
Conversation
🔍 Preview links for changed docs |
|
Pinging @elastic/es-data-management (Team:Data Management) |
|
Hi @seanzatzdev, I've created a changelog YAML for you. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of ideas!
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/RemediateProcessor.java
Outdated
Show resolved
Hide resolved
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/RemediateProcessor.java
Outdated
Show resolved
Hide resolved
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/RemediateProcessor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's just me, I find the processor name remediate a bit confusing. This processor itself transforms failure doc to its original doc, but there are more to actually "remediate" the failure doc outside of this processor like reindexing. I wonder if this processor should be named something more accurate to what it does. To throw some ideas, something like failure_source, failure_to_origin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR generally LGTM, I want to leave the final approval to @jbaiera since he is the expert on failure store.
.../yamlRestTest/resources/rest-api-spec/test/ingest/350_recover_failure_document_processor.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really great! I left just a few small comments, but once those are handled I think it LGTM!
...st-common/src/main/java/org/elasticsearch/ingest/common/RecoverFailureDocumentProcessor.java
Outdated
Show resolved
Hide resolved
...st-common/src/main/java/org/elasticsearch/ingest/common/RecoverFailureDocumentProcessor.java
Outdated
Show resolved
Hide resolved
...mmon/src/test/java/org/elasticsearch/ingest/common/RecoverFailureDocumentProcessorTests.java
Outdated
Show resolved
Hide resolved
...st-common/src/main/java/org/elasticsearch/ingest/common/RecoverFailureDocumentProcessor.java
Outdated
Show resolved
Hide resolved
...mmon/src/test/java/org/elasticsearch/ingest/common/RecoverFailureDocumentProcessorTests.java
Outdated
Show resolved
Hide resolved
docs/reference/enrich-processor/recover-failure-document-processor.md
Outdated
Show resolved
Hide resolved
|
@jbaiera thanks for the great feedback! |
In our docs at https://www.elastic.co/docs/manage-data/data-store/data-streams/failure-store-recipes#create-a-pipeline-to-convert-failure-documents we currently describe how to remediate documents from the failure store using a Painless script.
To make things less error-prone, this PR encapsulates this functionality into a processor.
e.g.
returns the following response:
Using this processor for an invalid failure-doc results in an error, e.g.:
returns
Closes #132940