-
Notifications
You must be signed in to change notification settings - Fork 666
Remove -store.query-chunk-limit #705
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,7 +360,7 @@ func (c *store) getMetricNameChunks(ctx context.Context, userID string, from, th | |
| filtered := filterChunksByTime(from, through, chunks) | ||
| level.Debug(log).Log("Chunks post filtering", len(chunks)) | ||
|
|
||
| maxChunksPerQuery := c.limits.MaxChunksPerQueryFromStore(userID) | ||
| maxChunksPerQuery := c.limits.MaxChunksPerQuery(userID) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than fixing this code (and other files in this package), we should remove it. But until then, this is fine.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I agree, it felt a little fruitless making some of these edits with the removal pending. I did it in this order to help myself understand it in isolation. I've been looking at the query path removal story, so if that goes well hopefully most of the package will be deleted soon. |
||
| if maxChunksPerQuery > 0 && len(filtered) > maxChunksPerQuery { | ||
| err := QueryError(fmt.Sprintf("Query %v fetched too many chunks (%d > %d)", allMatchers, len(filtered), maxChunksPerQuery)) | ||
| level.Error(log).Log("err", err) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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 wasn't sure if changing this default was correct or not.
max_fetched_chunks_per_querypreviously could not have had a default, since if it was set it would overridemax_chunks_per_query. With that entanglement now gone, I thought it made sense to inherit the default rather than be left unlimited.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 think setting this to the 2M is limit is correct for how this this limit behaves today. In blocks_store_queryable we call
MaxChunksPerQueryFromStorewhich would call thelimits.MaxChunksPerQueryFromStorecode below. Since we havemax_fetched_chunks_per_queryset to 0 (disabled) by default with the logic inMaxChunksPerQueryFromStorewe would get themax_chunks_per_querylimit of 2M sincemax_fetched_chunks_per_queryis not greater than 0.However, I think the original intention was for this limit to be disabled by default. So maybe 0 is what we want here. 2M chunks seems to be a large amount of chunks so I don't really see us hitting that limit often if ever today so I don't think it would effect anything to disable this limit.
I'm also only looking at the blocks path here since the intention is to remove the chunks storage path.
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.
Actually in looking at the original PR I see Marco say:
So maybe the intention here is to make sure that limit is carried through to introduce a limit to the ingesters and storegateway, so then 2M would be correct as the default.