-
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
Add verbose pipeline parameter to output each processor's execution details #16843
Add verbose pipeline parameter to output each processor's execution details #16843
Conversation
d5a2c4c
to
d931750
Compare
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.
Almost there! Good work @junweid62
server/src/main/java/org/opensearch/search/pipeline/TrackingSearchRequestProcessorWrapper.java
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/pipeline/SearchPipelineServiceTests.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/TrackingSearchResponseProcessorWrapper.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/PipelinedRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/SearchPipelineService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/SearchPipelineService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/ProcessorExecutionDetail.java
Show resolved
Hide resolved
Signed-off-by: Junwei Dai <[email protected]>
Signed-off-by: Junwei Dai <[email protected]>
03b16d5
to
ba933c2
Compare
❌ Gradle check result for ba933c2: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/search/pipeline/ProcessorExecutionDetail.java
Show resolved
Hide resolved
Signed-off-by: Junwei Dai <[email protected]>
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.
Thanks, @junweid62! It's looking pretty good.
I just had a few comments, mostly around code that I think you can safely remove.
server/src/main/java/org/opensearch/search/pipeline/Pipeline.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/Pipeline.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/PipelinedRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/SearchPipelineService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/TrackingSearchRequestProcessorWrapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/TrackingSearchResponseProcessorWrapper.java
Show resolved
Hide resolved
Signed-off-by: Junwei Dai <[email protected]>
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.
LGTM! Thanks for patiently addressing all the comments. Can merge after @msfroh review. Please make sure to perform the BWC process on the PR
❌ Gradle check result for 386d1f9: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Junwei Dai <[email protected]>
server/src/main/java/org/opensearch/search/pipeline/TrackingSearchRequestProcessorWrapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/pipeline/TrackingSearchResponseProcessorWrapper.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 1ccc9c6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Junwei Dai <[email protected]>
Signed-off-by: Junwei Dai <[email protected]>
…etails (#16843) * Add verbose pipeline parameter to output each processor's execution details Signed-off-by: Junwei Dai <[email protected]> * add change log Signed-off-by: Junwei Dai <[email protected]> # Conflicts: # CHANGELOG.md * Refactor ProcessorExecutionDetail to improve field handling Signed-off-by: Junwei Dai <[email protected]> * Fix ITtest Fail Signed-off-by: Junwei Dai <[email protected]> * Add more unit test Signed-off-by: Junwei Dai <[email protected]> * resolve comments Signed-off-by: Junwei Dai <[email protected]> * 1.add todo to change version.current 2.use exist xcontentUtil to read 3.move processor excution key to ProcessorExecutionDetail Signed-off-by: Junwei Dai <[email protected]> * refactor code Signed-off-by: Junwei Dai <[email protected]> * refactor code based on the comment Signed-off-by: Junwei Dai <[email protected]> * refactor code based on the comment Signed-off-by: Junwei Dai <[email protected]> * 1.add javadoc 2.refactor error message Signed-off-by: Junwei Dai <[email protected]> * change error message Signed-off-by: Junwei Dai <[email protected]> * 1.Added wrappers for tracking execution details of search processors. 2.Removed redundant logic for cleaner and simpler implementation. Signed-off-by: Junwei Dai <[email protected]> * change version to 3.0.0 Signed-off-by: Junwei Dai <[email protected]> * fix unit test Signed-off-by: Junwei Dai <[email protected]> * fix unit test Signed-off-by: Junwei Dai <[email protected]> * addressed comments 1. removed unnecessary log Signed-off-by: Junwei Dai <[email protected]> * addressed comments Signed-off-by: Junwei Dai <[email protected]> * revise comment to opensearch.api Signed-off-by: Junwei Dai <[email protected]> * removed unused logger and comment Signed-off-by: Junwei Dai <[email protected]> * removed unnecessary try catch block. add more comment Signed-off-by: Junwei Dai <[email protected]> * addressed comments Signed-off-by: Junwei Dai <[email protected]> * remove wrong unit test Signed-off-by: Junwei Dai <[email protected]> --------- Signed-off-by: Junwei Dai <[email protected]> Co-authored-by: Junwei Dai <[email protected]> (cherry picked from commit e15f712) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…r's execution (#17097) * Add verbose pipeline parameter to output each processor's execution details (#16843) * Add verbose pipeline parameter to output each processor's execution details Signed-off-by: Junwei Dai <[email protected]> * add change log Signed-off-by: Junwei Dai <[email protected]> # Conflicts: # CHANGELOG.md * Refactor ProcessorExecutionDetail to improve field handling Signed-off-by: Junwei Dai <[email protected]> * Fix ITtest Fail Signed-off-by: Junwei Dai <[email protected]> * Add more unit test Signed-off-by: Junwei Dai <[email protected]> * resolve comments Signed-off-by: Junwei Dai <[email protected]> * 1.add todo to change version.current 2.use exist xcontentUtil to read 3.move processor excution key to ProcessorExecutionDetail Signed-off-by: Junwei Dai <[email protected]> * refactor code Signed-off-by: Junwei Dai <[email protected]> * refactor code based on the comment Signed-off-by: Junwei Dai <[email protected]> * refactor code based on the comment Signed-off-by: Junwei Dai <[email protected]> * 1.add javadoc 2.refactor error message Signed-off-by: Junwei Dai <[email protected]> * change error message Signed-off-by: Junwei Dai <[email protected]> * 1.Added wrappers for tracking execution details of search processors. 2.Removed redundant logic for cleaner and simpler implementation. Signed-off-by: Junwei Dai <[email protected]> * change version to 3.0.0 Signed-off-by: Junwei Dai <[email protected]> * fix unit test Signed-off-by: Junwei Dai <[email protected]> * fix unit test Signed-off-by: Junwei Dai <[email protected]> * addressed comments 1. removed unnecessary log Signed-off-by: Junwei Dai <[email protected]> * addressed comments Signed-off-by: Junwei Dai <[email protected]> * revise comment to opensearch.api Signed-off-by: Junwei Dai <[email protected]> * removed unused logger and comment Signed-off-by: Junwei Dai <[email protected]> * removed unnecessary try catch block. add more comment Signed-off-by: Junwei Dai <[email protected]> * addressed comments Signed-off-by: Junwei Dai <[email protected]> * remove wrong unit test Signed-off-by: Junwei Dai <[email protected]> --------- Signed-off-by: Junwei Dai <[email protected]> Co-authored-by: Junwei Dai <[email protected]> (cherry picked from commit e15f712) Signed-off-by: Junwei Dai <[email protected]> * bring back the constructor SearchResponseSections Signed-off-by: Junwei Dai <[email protected]> * bring back the constructor InternalSearchResponse Signed-off-by: Junwei Dai <[email protected]> --------- Signed-off-by: Junwei Dai <[email protected]> Co-authored-by: Junwei Dai <[email protected]>
Jan 16 revision:
When the verbose pipeline mode is enabled, if a processor encounters an error during execution, the search process will not be interrupted. Instead, the error will be documented in the processor's execution details (e.g., in ProcessorExecutionDetail) and the remaining search process will proceed as normal.
Description
Related RFC : #16705
This PR introduces enhancements to OpenSearch's search pipeline functionality, focusing on improving the traceability and debugging of search request and response transformations. It addresses the increasing complexity of search pipeline processors by implementing verbose mode support, which provides detailed insights into processor execution.
Adds Verbose Mode for Search Pipelines:
verbose_pipeline
parameter to search requests, default to false.Improves Pipeline Debugging:
Supports All Pipeline Configurations:
Test Framework Enhancements:
Example output with request processor:
filter_query
response processor:rename_field
andsort
Related Issues
Resolves #14745
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.