Skip to content

Add store-gateway support to querier #2469

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

Conversation

pracucci
Copy link
Contributor

@pracucci pracucci commented Apr 15, 2020

What this PR does:
Following up #2458, in this PR I'm introducing the store-gateway support to queriers. Currently, store-gateways are opt-in so you can still use blocks synched/loaded in queriers (store-gateway will be made mandatory in a future PR, once we'll be confident enough with the store-gateway).

Out of the scope of this PR (to keep this PR "smaller"):

  • Consistency check
  • Cleanup the config to avoid having to pass store-gateway config to the querier
  • Documentation / CHANGELOG entry

This PR is a draft because it's still lacking:

  • Solve (1) TODO in the code
  • Integration tests
  • Cleanup the config (currently the querier requires the store-gateway config, which is a bad design)

I've opened the draft to start collecting some feedback.

Which issue(s) this PR fixes:
N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
@pracucci pracucci requested a review from pstibrany April 15, 2020 17:10
@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch 2 times, most recently from c99cad1 to 6c9ee92 Compare April 16, 2020 11:05
@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch from 6c9ee92 to c55fe64 Compare April 16, 2020 11:57
@pracucci pracucci mentioned this pull request Apr 16, 2020
3 tasks
@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch 4 times, most recently from 22e561f to 04acb27 Compare April 16, 2020 15:48
@pracucci pracucci marked this pull request as ready for review April 16, 2020 16:01
@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch 2 times, most recently from a6d4e1c to 0f0e94f Compare April 16, 2020 16:14
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.

Excellent job Marco!

@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch from 0f0e94f to 8c48205 Compare April 17, 2020 08:38
@pracucci
Copy link
Contributor Author

Thanks @pstibrany for your review! I've address your comments about errors wrapping/unwrapping. May you take a look, please?

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

@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch from 04c89d4 to 37b5549 Compare April 17, 2020 12:09
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci force-pushed the add-store-gateway-support-to-querier branch from 37b5549 to 0da4003 Compare April 20, 2020 08:48
@pracucci
Copy link
Contributor Author

@pstibrany I've unit tested blocksStoreQuerier.SelectSorted() mocking everything as agreed offline (see commit). Could you take a look, please?

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, nice test.

@pracucci pracucci merged commit 081f824 into cortexproject:master Apr 20, 2020
@pracucci pracucci deleted the add-store-gateway-support-to-querier branch April 20, 2020 09:05
simonswine pushed a commit to grafana/e2e that referenced this pull request Jan 13, 2022
* Add store-gateway support to querier

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Fixed errors wrapping / unwrapping in blockStoreQuerier

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Use errors.Is() instead of errors.Unwrap()

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Unit tested blocksStoreQuerier.SelectSorted()

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants