diff --git a/pkg/bloomcompactor/v2_meta.go b/pkg/bloomcompactor/v2_meta.go index 5fbb1393b6363..6b60341177327 100644 --- a/pkg/bloomcompactor/v2_meta.go +++ b/pkg/bloomcompactor/v2_meta.go @@ -131,6 +131,6 @@ type MetaStore interface { type BlockStore interface { // TODO(owen-d): flesh out|integrate against bloomshipper.Client - GetBlocks([]BlockRef) ([]interface{}, error) + GetBlocks([]BlockRef) ([]*v1.Block, error) PutBlock(interface{}) error } diff --git a/pkg/bloomcompactor/v2controller.go b/pkg/bloomcompactor/v2controller.go index 8faee0be5537d..b92c9d58a2e81 100644 --- a/pkg/bloomcompactor/v2controller.go +++ b/pkg/bloomcompactor/v2controller.go @@ -159,13 +159,17 @@ func (s *SimpleBloomController) do(ctx context.Context) error { func (s *SimpleBloomController) loadWorkForGap(id tsdb.Identifier, gap gapWithBlocks) (v1.CloseableIterator[*v1.Series], []*v1.Block, error) { // load a series iterator for the gap - _, err := s.tsdbStore.LoadTSDB(id, gap.bounds) + seriesItr, err := s.tsdbStore.LoadTSDB(id, gap.bounds) if err != nil { return nil, nil, errors.Wrap(err, "failed to load tsdb") } - // TODO(owen-d): finish - panic("not implemented") + blocks, err := s.blockStore.GetBlocks(gap.blocks) + if err != nil { + return nil, nil, errors.Wrap(err, "failed to get blocks") + } + + return seriesItr, blocks, nil } type gapWithBlocks struct {