- Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Closed
Copy link
Labels
:Distributed Indexing/DistributedA catch all label for anything in the Distributed Indexing Area. Please avoid if you can.A catch all label for anything in the Distributed Indexing Area. Please avoid if you can.bug"" muted="" aria-describedby="MDU6TGFiZWwyMzE3Mw==-tooltip :R1aqdb:">>bugTeam:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.
Description
Elasticsearch Version
8.14
Installed Plugins
No response
Java Version
bundled
OS Version
any
Problem Description
TransportGetAllocationStatsAction runs on elected master so it is theoretically possible to overload it by executing node stats requests around various nodes in cluster, especially in a clusters with many shards as complexity is proportional to the shard count.
The aggregated result of the computation is small (5 numbers per node), we should consider caching it for small period of time (1 minute?) and reuse it between different calls during.
Lines 88 to 96 in 5e52059
| if (NodesStatsRequestParameters.Metric.ALLOCATIONS.containedIn(metrics)) { | |
| client.execute( | |
| TransportGetAllocationStatsAction.TYPE, | |
| new TransportGetAllocationStatsAction.Request(new TaskId(clusterService.localNode().getId(), task.getId())), | |
| listener.delegateFailure((l, r) -> { | |
| ActionListener.respondAndRelease(l, newResponse(request, merge(responses, r.getNodeAllocationStats()), failures)); | |
| }) | |
| ); | |
| } else { |
Steps to Reproduce
n/a
Logs (if relevant)
No response
Metadata
Metadata
Assignees
Labels
:Distributed Indexing/DistributedA catch all label for anything in the Distributed Indexing Area. Please avoid if you can.A catch all label for anything in the Distributed Indexing Area. Please avoid if you can.bug"" muted="" aria-describedby="MDU6TGFiZWwyMzE3Mw==-tooltip :R2hehb:">>bugTeam:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.