Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
  • Loading branch information
chaudum committed Jun 19, 2024
1 parent 69bd2f7 commit 40ccf84
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pkg/bloomgateway/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ var _ bloomshipper.Store = &dummyStore{}

// refs and blocks must be in 1-1 correspondence.
func newMockBloomStore(refs []bloomshipper.BlockRef, blocks []*v1.Block, metas []bloomshipper.Meta) *dummyStore {
allocator := mempool.New("bloompages", mempool.Buckets{
{Size: 32, Capacity: 512 << 10},
}, nil)
return &dummyStore{
refs: refs,
blocks: blocks,
metas: metas,
refs: refs,
blocks: blocks,
metas: metas,
allocator: allocator,
}
}

Expand All @@ -39,6 +43,8 @@ type dummyStore struct {
refs []bloomshipper.BlockRef
blocks []*v1.Block

allocator mempool.Allocator

// mock how long it takes to serve block queriers
delay time.Duration
// mock response error when serving block queriers in ForEach
Expand Down Expand Up @@ -78,7 +84,7 @@ func (s *dummyStore) Client(_ model.Time) (bloomshipper.Client, error) {
}

func (s *dummyStore) Allocator() mempool.Allocator {
return nil
return s.allocator
}

func (s *dummyStore) Stop() {
Expand All @@ -97,7 +103,7 @@ func (s *dummyStore) FetchBlocks(_ context.Context, refs []bloomshipper.BlockRef
if ref.Bounds.Equal(s.refs[i].Bounds) {
blockCopy := *block
bq := &bloomshipper.CloseableBlockQuerier{
BlockQuerier: v1.NewBlockQuerier(&blockCopy, false, v1.DefaultMaxPageSize),
BlockQuerier: v1.NewBlockQuerier(&blockCopy, s.Allocator(), v1.DefaultMaxPageSize),
BlockRef: s.refs[i],
}
result = append(result, bq)
Expand Down

0 comments on commit 40ccf84

Please sign in to comment.