-
Notifications
You must be signed in to change notification settings - Fork 818
Query store for series lookups #3461
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
Conversation
e325246
to
6703601
Compare
@pracucci and @pstibrany This is now ready for review. I am still querying the head even if the data is purely in object store because the abstractions are different and I can't think of a clean way to pass this flag down to Also, I know the flag description says labels APIs as well, but I'll add them in future PRs. |
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. I didn't know store gateways already support this by using SkipChunks, nice!
pkg/querier/querier.go
Outdated
@@ -84,6 +85,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) { | |||
f.BoolVar(&cfg.IngesterStreaming, "querier.ingester-streaming", true, "Use streaming RPCs to query ingester.") | |||
f.IntVar(&cfg.MaxSamples, "querier.max-samples", 50e6, "Maximum number of samples a single query can load into memory.") | |||
f.DurationVar(&cfg.QueryIngestersWithin, "querier.query-ingesters-within", 0, "Maximum lookback beyond which queries are not sent to ingester. 0 means all queries are sent to ingester.") | |||
f.BoolVar(&cfg.QueryStoreForLabels, "querier.query-store-for-labels", false, "Query long-term store for series, label values and label names APIs. Works only with blocks engine.") |
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'm wondering whether we need this flag at all, or we should explicitly call it out as temporary? Can we make it true for blocks, and false for chunks?
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 would add the -enabled
suffix (and same for the YAML config option).
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.
Good job @gouthamve ! I left few minor comments. A part from this, few more things:
- Could you mark it as experimental in
docs/configuration/v1-guarantees.md
? - In the doc pages
docs/configuration/v1-guarantees.md
,docs/api/_index.md
anddocs/guides/limitations.md
we mention the/api/v1/series
API can't query the long-term storage. Could you improve the documentation, clearly explaining it's not supported for the chunks storage but the blocks storage supports it when the flag is enabled?
pkg/querier/querier.go
Outdated
@@ -84,6 +85,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) { | |||
f.BoolVar(&cfg.IngesterStreaming, "querier.ingester-streaming", true, "Use streaming RPCs to query ingester.") | |||
f.IntVar(&cfg.MaxSamples, "querier.max-samples", 50e6, "Maximum number of samples a single query can load into memory.") | |||
f.DurationVar(&cfg.QueryIngestersWithin, "querier.query-ingesters-within", 0, "Maximum lookback beyond which queries are not sent to ingester. 0 means all queries are sent to ingester.") | |||
f.BoolVar(&cfg.QueryStoreForLabels, "querier.query-store-for-labels", false, "Query long-term store for series, label values and label names APIs. Works only with blocks engine.") |
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 would add the -enabled
suffix (and same for the YAML config option).
Signed-off-by: Goutham Veeramachaneni <[email protected]>
c20a287
to
e74d58f
Compare
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.
Thanks @gouthamve for addressing my feedback! Final comments and then we're good to go 🚀
Signed-off-by: Goutham Veeramachaneni <[email protected]>
e74d58f
to
f301635
Compare
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.
Thanks a lot @gouthamve ! LGTM
In prometheus 2.24 dep upgrade prometheus changed how it signaled to queriers whether the request was for data or just the series. So with that upgrade we started *always* fetching all the data regardless of the query (in this case a series call would fetch all data for those series in the time range requested). As with before we're working around this by introspecting (cortex does the same -- cortexproject/cortex#3461). Fixes #415
In prometheus 2.24 dep upgrade prometheus changed how it signaled to queriers whether the request was for data or just the series. So with that upgrade we started *always* fetching all the data regardless of the query (in this case a series call would fetch all data for those series in the time range requested). As with before we're working around this by introspecting (cortex does the same -- cortexproject/cortex#3461). Fixes #415
In prometheus 2.24 dep upgrade prometheus changed how it signaled to queriers whether the request was for data or just the series. So with that upgrade we started *always* fetching all the data regardless of the query (in this case a series call would fetch all data for those series in the time range requested). As with before we're working around this by introspecting (cortex does the same -- cortexproject/cortex#3461). Fixes jacksontj#415
Signed-off-by: Goutham Veeramachaneni [email protected]
What this PR does:
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]