Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cluster Stats Request performs shard level aggregations on coordinator node instead of individual data nodes #14714

Closed
Pranshu-S opened this issue Jul 11, 2024 · 0 comments · Fixed by #14426
Labels
bug Something isn't working Cluster Manager v2.16.0 Issues and PRs related to version 2.16.0

Comments

@Pranshu-S
Copy link
Contributor

Describe the bug

The current approach for generating cluster stats indices incurs significant overhead in large clusters with numerous shards distributed across nodes. This issue arises due to the following steps:

  1. Fetching Shard-Level Stats: Each node fetches a map containing individual shard statistics.
  2. Accumulating on Request Node: The node receiving the REST request (request node) gathers this information from all participating nodes.
  3. Inefficient Data Structures: Creating hash-maps from the StreamInput and iterating through them for accumulation are computationally expensive.

image

Related component

Other

To Reproduce

In TransportClusterStatsAction, each node is made to return ShardStats map as defined here which is then iterated over in ClusterStatsIndices. This iteration goes through each shard stats entry in each node response.

Expected behavior

The ShardLevel stats should be pre-computed in the data nodes prior to sending it back to the coordinator node.

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@Pranshu-S Pranshu-S added bug Something isn't working untriaged labels Jul 11, 2024
@github-actions github-actions bot added the Other label Jul 11, 2024
@rwali-aws rwali-aws added Cluster Manager v2.16.0 Issues and PRs related to version 2.16.0 and removed Other untriaged labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cluster Manager v2.16.0 Issues and PRs related to version 2.16.0
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants