-
Notifications
You must be signed in to change notification settings - Fork 569
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
Compactor: Upload Sparse Index Headers to Object Storage #10684
base: main
Are you sure you want to change the base?
Compactor: Upload Sparse Index Headers to Object Storage #10684
Conversation
Before this is marked as ready for review, |
💻 Deploy preview available: https://deploy-preview-mimir-10684-zb444pucvq-vp.a.run.app/docs/mimir/latest/ |
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.
thanks for working on this. The logic looks sound, but i think we can move around where it sits
…pload if not on fs
This reverts commit 92b4610.
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, thanks for working on this. I left small suggestions and pushed a change to the changelog because i think it got lost in rebasing
i realized we aren't monitoring the process of constructing and parsing the sparse headers. So we wouldn't know if the compactors suddenly start failing to construct or upload these sparse headers. We also wouldn't know if the store-gateways suddenly find them corrupted. If this happens the query path will silently degrade. We should add some metrics to track failures to construct and uploading and to download and parse and alerts on those in case they keep failing for a long time. Do you want to give this a try in a follow-up PR? |
Co-authored-by: Dimitar Dimitrov <[email protected]>
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.
thanks for working through the comments
LGTM
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.
Thanks, @dmwilson-grafana !
Co-authored-by: Taylor C <[email protected]>
What this PR does
Adds an option
-compactor.upload-sparse-index-headers
which allows the compactor to upload sparse index headers to object storage. When this option is set totrue
, the compactor will build and upload sparse-index-headers after all other files in the block have been uploaded to object storage. When this option is set, it's a "best effort" process, the compactor won't exit an otherwise successful compaction job early if there's an error affecting the sparse-index-header upload.To make this change, this PR moves the contents of
pkg/storegateway/indexheader
topkg/storage/indexheader
. Both StoreGateway and Compactor importpkg/storage/indexheader
.As implemented, sparse headers uploaded from the compactor use
DefaultPostingOffsetInMemorySampling
(1/32), notblocks-storage.bucket-store.posting-offsets-in-mem-sampling
.Adding an extra file to upload for each block will slow the comapctor a bit. In testing, enabling upload of sparse-index-headers added <100ms/block.
Which issue(s) this PR fixes or relates to
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.