Remove resource usages object from search response headers#16532
Merged
msfroh merged 1 commit intoopensearch-project:mainfrom Nov 1, 2024
Merged
Conversation
sgup432
reviewed
Oct 31, 2024
server/src/main/java/org/opensearch/action/search/SearchTaskRequestOperationsListener.java
Show resolved
Hide resolved
sgup432
reviewed
Oct 31, 2024
Contributor
|
❌ 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
msfroh
approved these changes
Oct 31, 2024
Contributor
|
@ansjcy Can you please add a changelog entry for this? |
Signed-off-by: Chenyang Ji <cyji@amazon.com>
6f649c6 to
beac88d
Compare
Contributor
|
❕ 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. |
This was referenced Nov 1, 2024
msfroh
approved these changes
Nov 1, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Nov 1, 2024
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>
dbwiddis
pushed a commit
that referenced
this pull request
Nov 2, 2024
(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>
akolarkunnu
pushed a commit
to akolarkunnu/OpenSearch
that referenced
this pull request
Jan 21, 2025
Signed-off-by: Chenyang Ji <cyji@amazon.com>
This was referenced Jan 13, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.