-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Blooms/integration fixes #11979
Blooms/integration fixes #11979
Conversation
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
avoids race conditions in storage Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
62c6cd2
to
5ee3d5a
Compare
Signed-off-by: Owen Diehl <[email protected]>
5ee3d5a
to
0f9920c
Compare
Signed-off-by: Owen Diehl <[email protected]>
9fd015e
to
2d09d20
Compare
Signed-off-by: Owen Diehl <[email protected]>
Signed-off-by: Owen Diehl <[email protected]>
pkg/bloomcompactor/controller.go
Outdated
@@ -92,6 +92,15 @@ func (s *SimpleBloomController) compactTenant( | |||
return errors.Wrap(err, "failed to get metas") | |||
} | |||
|
|||
level.Debug(logger).Log("msg", "found relevant metas", "metas", len(metas)) | |||
|
|||
// fetch all metas overlapping all metas overlapping our ownership range so we can safely |
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.
// fetch all metas overlapping all metas overlapping our ownership range so we can safely | |
// fetch all metas overlapping our ownership range so we can safely |
@@ -226,7 +226,7 @@ func TestMergeBuilder(t *testing.T) { | |||
) | |||
|
|||
// Ensure that the merge builder combines all the blocks correctly | |||
mergeBuilder := NewMergeBuilder(dedupedBlocks(blocks), storeItr, pop) | |||
mergeBuilder := NewMergeBuilder(dedupedBlocks(blocks), storeItr, pop, NewMetrics(nil)) |
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.
Shouldn't a registerer be passed to NewMetrics()
?
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.
it short circuits with nil
@@ -77,7 +81,7 @@ func (defaultKeyResolver) Block(ref BlockRef) Location { | |||
ref.TenantID, | |||
BlocksPrefix, | |||
ref.Bounds.String(), | |||
fmt.Sprintf("%d-%d-%x", ref.StartTimestamp, ref.EndTimestamp, ref.Checksum), | |||
fmt.Sprintf("%d-%d-%x%s", ref.StartTimestamp, ref.EndTimestamp, ref.Checksum, extTarGz), |
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.
👍
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.
Approved to unblock
level.Debug(logger).Log("msg", "found relevant metas", "metas", len(metas)) | ||
|
||
// fetch all metas overlapping all metas overlapping our ownership range so we can safely | ||
// check which metas can be deleted even if they only partially overlap out ownership range |
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.
// check which metas can be deleted even if they only partially overlap out ownership range | |
// check which metas can be deleted even if they only partially overlap our ownership range |
return errors.Wrap(err, "failed to delete block") | ||
} | ||
} | ||
level.Debug(logger).Log("msg", "removed outdated block", "block", block.String()) |
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 it would be nice to have a metric to track how many blocks/metas are deleted
pkg/bloomcompactor/tsdb.go
Outdated
@@ -236,8 +236,8 @@ func NewTSDBStores( | |||
if err != nil { | |||
return nil, errors.Wrap(err, "failed to create object client") | |||
} | |||
prefix := path.Join(cfg.IndexTables.PathPrefix, cfg.IndexTables.Prefix) | |||
res.stores[i] = NewBloomTSDBStore(storage.NewIndexStorageClient(c, prefix)) | |||
// prefix := path.Join(cfg.IndexTables.PathPrefix, cfg.IndexTables.Prefix) |
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.
Can we remove this?
} | ||
|
||
const chunkIndexedTypeIterated = "iterated" | ||
const chunkIndexedTypeCopied = "copied" | ||
|
||
func NewMetrics(r prometheus.Registerer) *Metrics { | ||
return &Metrics{ | ||
sbfCreationTime: promauto.With(r).NewCounter(prometheus.CounterOpts{ |
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 this should probably be a histogram
Signed-off-by: Owen Diehl <[email protected]>
A few more fixes/improvements while running & debugging blooms