-
Notifications
You must be signed in to change notification settings - Fork 839
Decoupled BucketStores from UserStore #2421
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
Decoupled BucketStores from UserStore #2421
Conversation
46adc64 to
59b3694
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
UserStore: BucketStores + service. I haven't renamed it in this PR to keep the diff easier. Also UserStore will disappear once the store-gateway will be complete.
Feel free to rename, it's in its own file now anyway, diff will not be much bigger I think.
Unrelated to this PR, but perhaps worth fixing... should function used in Iter call react on context being done?
select {
case jobs <- job{userID: user, store: bs}:
return nil
case <-ctx.Done():
return ctx.Err()
}
Otherwise, it can be blocked here for some time, until some worker is finished with sync.
pkg/querier/block_store.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it will. I think deduplicate filter removes old blocks if new blocks cover it completely, but we better verify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may have troubles with the consistency check, at least as I did design it. I will write down different scenarios in tests and let's see (once we'll reach the point to build the consistency check).
Signed-off-by: Marco Pracucci <[email protected]>
Definitely. |
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
As agreed offline, renamed |
59b3694 to
ea54e44
Compare
What this PR does:
The upcoming
store-gateway(proposal) will run the ThanosBucketStoreinstead of the querier.Currently, we do have a multi-tenant
BucketStorewrapper which isUserStore. TheUserStoreis both a wrapper overBucketStoreand a service which does an initial blocks synching + a periodic sync.The
store-gatewaywill need to trigger the sync differently due to the sharding. In particular, thestore-gatewayneeds to coordinate the initial sync while the instance is in theJOININGstate within the ring (because it needs to have the tokens first) and to trigger a sync both periodically and when the token ranges assigned to instance itself change (ring topology changed).Instead of duplicating code between the querier and store-gateway for the co-existence period, in this PR I'm decoupling the multi-tenant wrapper of
BucketStorefromUserStore:BucketStores: multi-tenant wrapper overBucketStore(will be directly used by the store-gateway). TheSeries()API here matches the exact gRPC service signature of the upcoming store-gateway so that we can do a pass-through to the ThanosBucketStoreUserStore:BucketStores+ service. I haven't renamed it in this PR to keep the diff easier. AlsoUserStorewill disappear once the store-gateway will be complete.Which issue(s) this PR fixes:
N/A
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]