Skip to content

Allows to specify a custom interval for splitting and caching frontend requests. #1761

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 3 commits into from
Nov 11, 2019

Conversation

cyriltovena
Copy link
Contributor

Currently rebased on #1734. I'll rebase it to master once merged to ease review.

/cc @gouthamve @jtlisi

@cyriltovena cyriltovena changed the title Allows to specify custom interval for splitting and caching frontend requests. Allows to specify a custom interval for splitting and caching frontend requests. Oct 25, 2019
@cyriltovena cyriltovena force-pushed the cache-period branch 4 times, most recently from 0bb48b5 to 99e0034 Compare October 29, 2019 14:39
@cyriltovena
Copy link
Contributor Author

ready for review now that #1734 is merged.

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 @cyriltovena! I left few minor comments.

@cyriltovena
Copy link
Contributor Author

Thank you @pracucci an @gouthamve, @jtlisi What do you think ?

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 @cyriltovena! I left a couple of last-minute comments I would be glad you could take a look before the PR will get merged.

@cyriltovena
Copy link
Contributor Author

Good job @cyriltovena! I left a couple of last-minute comments I would be glad you could take a look before the PR will get merged.

Thanks ! updated.

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 @cyriltovena for addressing my feedback. LGTM!

@tomwilkie
Copy link
Contributor

Its a shame the split_by_day.go -> split_by_interval.go rename isn't picked up by git, but LGTM.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

if cfg.SplitQueriesByDay {
queryRangeMiddleware = append(queryRangeMiddleware, InstrumentMiddleware("split_by_day"), SplitByDayMiddleware(limits, codec))
// SplitQueriesByDay is deprecated use SplitQueriesByInterval.
if cfg.SplitQueriesByDay == true {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could log a warning here, as we do on DeprecatedFlag()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure good idea !

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Contributor

@jtlisi jtlisi left a comment

Choose a reason for hiding this comment

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

LGTM

@jtlisi jtlisi merged commit 9fe46d2 into cortexproject:master Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants