-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Search pipelines] Add Global Ignore_failure options for Processors #8373
[Search pipelines] Add Global Ignore_failure options for Processors #8373
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
reproduce gradle check error by running
gradle check failed not related to the code change |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Thanks @andrross! Ready for merging. |
server/src/main/java/org/opensearch/ingest/ConfigurationUtils.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/AbstractProcessor.java
Show resolved
Hide resolved
The default of ignoreFailure option is false, then will throw error as normal. Hope this make senses. |
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
This is helpful in general but not for individual users:
Do we return it back with the search response? That would be helpful for sure. |
Gradle Check (Jenkins) Run Completed with:
|
That's a good point. The response from any pipelines(search pipeline/ingest pipeline) will look like the same response as other search response. That's one of the charms using search pipelines. So we can NOT tell if a response has gone through the ignoreFailure, and that is also similar to the existing design of ignore Failure in the ingest pipeline here The search pipelines stats does gather stats for all requests using pipeline API. And the response from the stats look like this . If we would like to expose the information from the search pipeline in the search response, for example, the pipeline name, the number of processor within the pipeline, the processor's name, is it ignoreFailure, the failure processor count, we can discuss in this new issue and might implement in the future release. |
Gradle Check (Jenkins) Run Completed with:
|
I think that would be useful, could you please create an issue for that? Certainly not enough time to make it to |
…8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com> (cherry picked from commit 2004ba0) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…8373) (#8637) * Add Global Ingore_failure options for Processors * add changelog * Add ignore_failure to 40_rename_response * Change Boolean to boolean and refactor AbstractProcessor * rename to isIgnoreFailure and add tests * rename to isIgnoreFailure and add tests * add ignoreFailure to runSearchPhaseResultsTransformer * fix filter query and change log warn message * Add test on matching each processor stat * Add test on matching each processor stat * remove extra spaces and words * use IGNORE_FAILURE_KEY --------- (cherry picked from commit 2004ba0) Signed-off-by: Mingshi Liu <mingshl@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…pensearch-project#8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com>
…pensearch-project#8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com>
…pensearch-project#8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com>
…pensearch-project#8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com> Signed-off-by: sahil buddharaju <sahilbud@amazon.com>
…pensearch-project#8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com>
…pensearch-project#8373) * Add Global Ingore_failure options for Processors Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add changelog Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add ignore_failure to 40_rename_response Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Change Boolean to boolean and refactor AbstractProcessor Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * rename to isIgnoreFailure and add tests Signed-off-by: Mingshi Liu <mingshl@amazon.com> * add ignoreFailure to runSearchPhaseResultsTransformer Signed-off-by: Mingshi Liu <mingshl@amazon.com> * fix filter query and change log warn message Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * Add test on matching each processor stat Signed-off-by: Mingshi Liu <mingshl@amazon.com> * remove extra spaces and words Signed-off-by: Mingshi Liu <mingshl@amazon.com> * use IGNORE_FAILURE_KEY Signed-off-by: Mingshi Liu <mingshl@amazon.com> --------- Signed-off-by: Mingshi Liu <mingshl@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
Search processors can be chained and process one after the other. Currently, when one of the processor got an exception, it immediately returns the exceptions, lost the result of the previously processing and also prevent the rest of the pipeline from processing.
By adding ignore_failure option in the processor, when a processor sets ignore_failure is true, and it triggers exceptions, it would get caught and logged into the failure count, but it won't stop the other processors to proceed further.
For example,
for a document,
we create a pipeline
guest_pipeline_ignore_failure_false
with a filter query processor and a rename processor without settingignore_failure
, which is default to be false. This pipeline is aiming at standardizing a field migration that named "product_1" before and now renamed to "product_name" and filter out internal customer orders.query with
guest_pipeline_ignore_failure_false
, will end up exceptions, because this is a new document, and there is no old field namedproduct_1
in it.But if we make another search pipeline enabled the option
ignore_failure
is true, then even though the renamed processor got exception, the filter query processor still works and return the document.Related Issues
8308](#8308)
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.