Skip to content

Commit

Permalink
legacy index reader getshards
Browse files Browse the repository at this point in the history
Signed-off-by: Owen Diehl <[email protected]>
  • Loading branch information
owen-d committed Mar 20, 2024
1 parent eda6ef8 commit 1f22cee
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pkg/storage/stores/series/series_index_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package series

import (
"context"
"errors"
"fmt"
"math"
"sort"
"sync"

Expand Down Expand Up @@ -761,14 +761,24 @@ func (c *IndexReaderWriter) Volume(_ context.Context, _ string, _, _ model.Time,
return nil, nil
}

// old index stores do not implement dynamic sharidng -- skip
func (c *IndexReaderWriter) GetShards(
_ context.Context,
_ string,
_, _ model.Time,
_ uint64,
_ chunk.Predicate,
) ([]logproto.Shard, error) {
return nil, errors.New("unimplemented GetShards() on legacy index stores")
// should not be called for legacy indices at all, so just return a single shard covering everything
// could be improved by reading schema shards
return []logproto.Shard{
logproto.Shard{
Bounds: logproto.FPBounds{
Min: 0,
Max: math.MaxUint64,
},
},
}, nil
}

// old index stores do not implement tsdb.ForSeries -- skip
Expand Down

0 comments on commit 1f22cee

Please sign in to comment.