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

Store: the series limit should count the number of unique series across the different blocks #8011

Open
damnever opened this issue Dec 20, 2024 · 1 comment

Comments

@damnever
Copy link
Contributor

Thanos, Prometheus and Golang version used:

Main Branch

Anything else we need to know:

The current series limit simply takes the sum of matched postings counts from blocks. Maybe we should count unique series for a better user experience

Thanos implementaion:

thanos/pkg/store/bucket.go

Lines 1179 to 1182 in 4a84785

// Apply series limiter eargerly if lazy postings not enabled.
if err := seriesLimiter.Reserve(uint64(len(b.lazyPostings.postings))); err != nil {
return httpgrpc.Errorf(int(codes.ResourceExhausted), "exceeded series limit: %s", err)
}

Cortex implementation:

https://github.com/cortexproject/cortex/blob/bb59466bcc2e4967c6b245407c539512e009e066/pkg/util/limiter/query_limiter.go#L69-L90

@yeya24
Copy link
Contributor

yeya24 commented Dec 23, 2024

+1 to the proposal. The implementation doesn't look like too hard but need proper benchmark to understand the performance impact.

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

No branches or pull requests

2 participants