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

Handle cache-control headers also during a partial cache hit. #2403

Merged

Conversation

cyriltovena
Copy link
Contributor

I was reading this code and realize that #1974 missed a place where we also query downstream for partial result in case of partial cache hit.

I've chatted about this with on Thanos dev and suggested to send a fix for them.

/cc @GiedriusS

Signed-off-by: Cyril Tovena cyril.tovena@gmail.com

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
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've removed some extra code from shouldCacheResponse to avoid extra review cycle, hope that's ok.

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, thanks!

@pstibrany pstibrany merged commit ac6a1ac into cortexproject:master Apr 6, 2020
@cyriltovena
Copy link
Contributor Author

LGTM.

I've removed some extra code from shouldCacheResponse to avoid extra review cycle, hope that's ok.

Of course @pstibrany !

Copy link
Contributor

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

Sorry for the late response. Thanks for this! This probably has saved some headaches for me because we were about to try this out. Only the last bits which enable most of the use-cases for Thanos of caching had been merged recently so I haven't run this code in production yet.

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