Skip to content

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

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

gouthamve
Copy link
Contributor

Signed-off-by: Goutham Veeramachaneni [email protected]

What this PR does:

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@gouthamve gouthamve force-pushed the query-store-meta branch 3 times, most recently from e325246 to 6703601 Compare November 4, 2020 16:39
@gouthamve gouthamve changed the title WIP: Query store for series lookups Query store for series lookups Nov 4, 2020
@gouthamve
Copy link
Contributor Author

@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 v2MetricsForLabelMatchers.

Also, I know the flag description says labels APIs as well, but I'll add them in future PRs.

Copy link
Contributor

@pstibrany pstibrany left a 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!

@@ -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.")
Copy link
Contributor

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?

Copy link
Contributor

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).

Copy link
Contributor

@pracucci pracucci left a 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:

  1. Could you mark it as experimental in docs/configuration/v1-guarantees.md?
  2. In the doc pages docs/configuration/v1-guarantees.md, docs/api/_index.md and docs/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?

@@ -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.")
Copy link
Contributor

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]>
@gouthamve gouthamve force-pushed the query-store-meta branch 2 times, most recently from c20a287 to e74d58f Compare November 9, 2020 10:07
Copy link
Contributor

@pracucci pracucci left a 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]>
Copy link
Contributor

@pracucci pracucci left a 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

@gouthamve gouthamve merged commit 1797adf into cortexproject:master Nov 9, 2020
@gouthamve gouthamve deleted the query-store-meta branch November 20, 2020 14:41
jacksontj added a commit to jacksontj/promxy that referenced this pull request Apr 2, 2021
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
jacksontj added a commit to jacksontj/promxy that referenced this pull request Apr 2, 2021
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
htross pushed a commit to HubSpot/promxy that referenced this pull request Jun 4, 2021
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
@alanprot alanprot mentioned this pull request Sep 14, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants