Chunked encoding for cluster reroute API#92615
Merged
elasticsearchmachine merged 6 commits intoelastic:mainfrom Jan 24, 2023
Merged
Chunked encoding for cluster reroute API#92615elasticsearchmachine merged 6 commits intoelastic:mainfrom
elasticsearchmachine merged 6 commits intoelastic:mainfrom
Conversation
The cluster reroute API (optionally) returns the cluster state in its response, which can therefore be rather large. elastic#92285 enables a chunked encoding of the cluster state, and this commit adjusts the reroute API to make use of this encoding too.
Collaborator
|
Pinging @elastic/es-distributed (Team:Distributed) |
henningandersen
approved these changes
Jan 24, 2023
Comment on lines
+34
to
+35
| * Similar to {@link #toXContentChunked} but for the {@link RestApiVersion#V_7} API. Note that chunked response bodies cannot send | ||
| * deprecation warning headers once transmission has started, so implementations must check for deprecated feature use before returning. |
Contributor
There was a problem hiding this comment.
I think the deprecation warning warning should go into the class javadocs instead. The usage added in this PR emits a warning in toXContentChunked, not the v7 one, and I think it applies equally to both.
| } | ||
| int actualChunks = 0; | ||
| final var iterator = response.toXContentChunked(params); | ||
| while (iterator.hasNext()) { |
Contributor
There was a problem hiding this comment.
Can we assert that only toXContentChunked outputs deprecations warnings? We may have to stop filtering warnings, but that seems desirable anyway.
19 tasks
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.
The cluster reroute API (optionally) returns the cluster state in its response, which can therefore be rather large. #92285 enables a chunked encoding of the cluster state, and this commit adjusts the reroute API to make use of this encoding too.