Don't request cluster metadata in _cat/shards impl (#59548)
Today `GET _cat/shards` requests the nodes, routing table, and metadata from the cluster state, but it does not use any information from the metadata portion of the response. Metadata includes things like mappings and templates that may be substantial in size. This commit drops the unnecessary metadata portion of this cluster state request.
This commit is contained in:
parent
66ef1cdad7
commit
0c2510dc68
|
@ -85,7 +85,7 @@ public class RestShardsAction extends AbstractCatAction {
|
|||
final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
|
||||
clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
|
||||
clusterStateRequest.masterNodeTimeout(request.paramAsTime("master_timeout", clusterStateRequest.masterNodeTimeout()));
|
||||
clusterStateRequest.clear().nodes(true).metadata(true).routingTable(true).indices(indices);
|
||||
clusterStateRequest.clear().nodes(true).routingTable(true).indices(indices);
|
||||
return channel -> client.admin().cluster().state(clusterStateRequest, new RestActionListener<ClusterStateResponse>(channel) {
|
||||
@Override
|
||||
public void processResponse(final ClusterStateResponse clusterStateResponse) {
|
||||
|
|
Loading…
Reference in New Issue