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] Level aggregations for node stats API should be processed on data nodes #13340

Closed
jainankitk opened this issue Apr 23, 2024 · 2 comments · Fixed by #14454
Closed

[BUG] Level aggregations for node stats API should be processed on data nodes #13340

jainankitk opened this issue Apr 23, 2024 · 2 comments · Fixed by #14454
Labels
bug Something isn't working Cluster Manager Other Stats v2.16.0 Issues and PRs related to version 2.16.0

Comments

@jainankitk
Copy link
Collaborator

Describe the bug

While reviewing #13237, I noticed that the node stats API does not pass the value of level parameter from coordinator to data node. Taking example of indices stats, that is inefficient due to 2 reasons:

  1. The data/coordinator nodes are serializing/deserializing all index shards information while that is not generally needed
  2. The coordinator node alone is responsible for aggregating the information from all the nodes, which can increase the overall latency of this operation

Related component

Other

To Reproduce

The writeTo method is serializing the most granular information for transport layer and the filtering is happening on the rest layer

Expected behavior

The data nodes should return only the information used for preparing the client response

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.

@jainankitk jainankitk added bug Something isn't working untriaged labels Apr 23, 2024
@github-actions github-actions bot added the Other label Apr 23, 2024
@shwetathareja
Copy link
Member

Thanks @jainankitk for reporting this issue. Agreed, there are other such APIs like _cluster/stats which also queries ShardStats which can be huge for a large cluster with several 10s of thousands of shards. @Pranshu-S has started looking into aggregating these shards stats on individual data nodes itself.

@jainankitk
Copy link
Collaborator Author

@Pranshu-S - @peteralfonsi has done basic implementation in #13237 for avoiding this issue with cache stats. We can leverage something similar or come up with better way to achieve this.

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 Other Stats 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.

3 participants