-
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
Remove resource usages object from search response headers #16532
Remove resource usages object from search response headers #16532
Conversation
server/src/main/java/org/opensearch/action/search/SearchTaskRequestOperationsListener.java
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.
Should we also consider adding an explicit dynamic setting for query/coordinator level resource stats?
This way we can continue to use shard level resource stats independently if we face any issue with coordinator level stats.
❌ Gradle check result for 93f2012: 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? |
93f2012
to
6f649c6
Compare
@ansjcy Can you please add a changelog entry for this? |
Signed-off-by: Chenyang Ji <cyji@amazon.com>
6f649c6
to
beac88d
Compare
❕ Gradle check result for beac88d: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16532 +/- ##
============================================
+ Coverage 72.07% 72.10% +0.02%
- Complexity 65048 65108 +60
============================================
Files 5313 5313
Lines 303442 303449 +7
Branches 43910 43910
============================================
+ Hits 218719 218814 +95
+ Misses 66786 66744 -42
+ Partials 17937 17891 -46 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Chenyang Ji <cyji@amazon.com> (cherry picked from commit 80ca32f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 80ca32f) Signed-off-by: Chenyang Ji <cyji@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>
Description
This PR (#13172) introduced shard-level resource usage tracking by adding task resource usage objects to the node response headers. However, by default, all headers from the thread context are added to the response header: https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/http/DefaultRestChannel.java#L156
This behavior could lead to excessive headers being sent to the client, potentially impacting latency. To address this, we now explicitly remove task-related headers before sending the response to the client.
Testing
before the changes, run an opensearch cluster and insert some document. Do search and get response headers.
With the change, run an opensearch cluster and insert some document. Do search and get response headers.
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.