Skip to content

Support Metadata API limit param in storage layer #6127

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

Closed
harry671003 opened this issue Jul 30, 2024 · 0 comments · Fixed by #6128
Closed

Support Metadata API limit param in storage layer #6127

harry671003 opened this issue Jul 30, 2024 · 0 comments · Fixed by #6128

Comments

@harry671003
Copy link
Contributor

harry671003 commented Jul 30, 2024

Is your feature request related to a problem? Please describe.
The metadata APIs like /api/v1/series, /api/v1/labels, /api/v1/label/<name>/values often timeout when queried with a lot of data.
Recently Prometheus introduced a new limit param in the above APIs for limiting the amount of data returned. This change was implemented in:

The #14109 allows storage implementations to know that the label names or label values request has a limit applied.
However, we currently don't make use of this information, so ingesters and store-gateways may do a bunch of work retrieving values that will then be thrown away in the querier.

Describe the solution you'd like
Cortex ingesters and store-gateways should truncate the results and return only up to the limit number of results

Describe alternatives you've considered
N/A

Additional context
prometheus/prometheus#12795 has more context about this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant