-
Notifications
You must be signed in to change notification settings - Fork 545
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
block-builder: Add basic series limit #9983
Conversation
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only checked the config to see the overall idea of this change (which LGTM). I let rest of the team reviewing the actual code changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo commentary 😸
pkg/blockbuilder/tsdb.go
Outdated
} | ||
|
||
userLimit := b.limits.MaxGlobalSeriesPerUser(userID) | ||
if userLimit <= b.applyGlobalSeriesLimitUnder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this is a temporary measure, but Under
doesn't match with <=
. It's really an AtMost
. Perhaps applyGlobalSeriesLimitMax
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the reword to applyMaxGlobalSeriesPerUser...
, using Max
as a suffix again sounds odd. How about applyMaxGlobalSeriesPerUserBelow
? And put in comments that it is inclusive.
Signed-off-by: Ganesh Vernekar <[email protected]>
@seizethedave I updated the PR. PTAL. |
What this PR does
This is a very naive solution to the limits before we have a better solution.
With this PR, we will allow up to the global series allowed for the user per partition, iff they global limit is under
block-builder.apply-global-series-under
. We do not apply any limits if the configured limit is over the flag value.Few examples of it working:
Let's assume
block-builder.apply-global-series-under=10000
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.