Skip to content

Commit

Permalink
bloom controller wiring
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Diehl <[email protected]>
  • Loading branch information
owen-d committed Jan 31, 2024
1 parent 8339db0 commit 88e24f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/bloomcompactor/v2_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
10 changes: 7 additions & 3 deletions pkg/bloomcompactor/v2controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 88e24f1

Please sign in to comment.