Chunked encoding for cluster state API#92285
Chunked encoding for cluster state API#92285elasticsearchmachine merged 14 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-distributed (Team:Distributed) |
|
NB most of these changes are just to add support for XContent fragments throughout. Kind of noisy. I could make it a separate API instead of adding a boolean parameter, maybe that would be nicer. |
|
#92534 will fix the failure; @elasticmachine please run elasticsearch-ci/part-1 |
|
@original-brownbear I've merged this with |
original-brownbear
left a comment
There was a problem hiding this comment.
Phew did my best to carefully read all the steps here, couldn't find any spot where the format would change or where we'd still serialize a problematically huge chunk => LGTM :)
| metrics.contains(Metric.CUSTOMS) | ||
| ? Iterators.flatMap( | ||
| customs.entrySet().iterator(), | ||
| cursor -> Iterators.concat( |
There was a problem hiding this comment.
NIT: could use org.elasticsearch.common.xcontent.ChunkedToXContentHelper#wrapWithObject here to shorten this a little
| * Response listener for REST requests which dispatches the serialization of the response off of the thread on which the response was | ||
| * received, since that thread is often a transport thread and XContent serialization might be expensive. | ||
| */ | ||
| public class DispatchingRestToXContentListener<Response extends ToXContentObject> extends RestActionListener<Response> { |
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.
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.
Relates #89838