-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Segment files #3261
Segment files #3261
Conversation
Filled by components that write meta.json (shipper, compactor, repair, ...) Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Don't panic if segment index is incorrect. Added comment to Iter about sorted results. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
…lling block.GetSegmentFiles creates an import cycle. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
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.
Dear Peter.
Amazing. LGTM. 💪
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Dear Bartek, thanks for your review. I've updated the PR with your suggestions. Please take a look at your convenience. With love, |
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 double checked if the new property is set in every place and I think so. This is apparently a small optimisation, but according to our calculations it would have a big impact to reduce bucket listing operations. Thanks @pstibrany !
Changes
This PR adds
segment_files
field intometa.json
file (Thanos section), which lists all segment files for a block. This helps to avoid call to storage to get this list. This small optimization helps to reduce amount of LIST operations in clusters with many created blocks.Verification
store/bucket.go
is hit by existing tests.