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

Use intervalFn to support dynamic split interval in query frontend #3066

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Aug 21, 2020

Signed-off-by: Ben Ye [email protected]

What this PR does:

This pr adds support for dynamic split interval based on the current request. This is useful in the Thanos downsampling use case.
For more details, please check thanos-io/thanos#1651.

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]

Copy link
Contributor

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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. It's a straightforward refactoring.

@@ -8,8 +8,10 @@ import (
"github.com/prometheus/client_golang/prometheus/promauto"
)

type IntervalFn func(r Request) time.Duration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the requirements on this function? Can it really return different interval for each request? How will that interact with the caching?

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 curious about this as well. I'm happy to merge it, while we discuss this.

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.

LGTM

@pracucci pracucci merged commit 8c4641a into cortexproject:master Aug 24, 2020
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.

4 participants