Skip to content

Commit

Permalink
Remove more chunkstore and schema version below v9 (#5650)
Browse files Browse the repository at this point in the history
* Remove more chunkstore and schema version below v9

Signed-off-by: Cyril Tovena <[email protected]>

* Fixes remaining tests

Signed-off-by: Cyril Tovena <[email protected]>

* Fixes remaining tests

Signed-off-by: Cyril Tovena <[email protected]>
  • Loading branch information
cyriltovena authored Mar 17, 2022
1 parent 34f9649 commit 59bd44a
Show file tree
Hide file tree
Showing 20 changed files with 125 additions and 1,860 deletions.
12 changes: 0 additions & 12 deletions pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ func (s *mockStore) PutOne(ctx context.Context, from, through model.Time, chunk
return nil
}

func (s *mockStore) Get(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([]chunk.Chunk, error) {
return nil, nil
}

func (s *mockStore) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([][]chunk.Chunk, []*chunk.Fetcher, error) {
return nil, nil, nil
}
Expand All @@ -320,14 +316,6 @@ func (s *mockStore) GetChunkFetcher(tm model.Time) *chunk.Fetcher {
return nil
}

func (s *mockStore) DeleteChunk(ctx context.Context, from, through model.Time, userID, chunkID string, metric labels.Labels, partiallyDeletedInterval *model.Interval) error {
return nil
}

func (s *mockStore) DeleteSeriesIDs(ctx context.Context, from, through model.Time, userID string, metric labels.Labels) error {
return nil
}

func (s *mockStore) Stop() {}

type mockQuerierServer struct {
Expand Down
8 changes: 0 additions & 8 deletions pkg/loki/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ func TestCrossComponentValidation(t *testing.T) {
SchemaConfig: storage.SchemaConfig{
SchemaConfig: chunk.SchemaConfig{
Configs: []chunk.PeriodConfig{
{
// zero should not error
RowShards: 0,
Schema: "v6",
From: chunk.DayTime{
Time: model.Now().Add(-48 * time.Hour),
},
},
{
RowShards: 16,
Schema: "v11",
Expand Down
13 changes: 0 additions & 13 deletions pkg/querier/querier_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,6 @@ func (s *storeMock) SelectSamples(ctx context.Context, req logql.SelectSamplePar
return res.(iter.SampleIterator), args.Error(1)
}

func (s *storeMock) Get(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([]chunk.Chunk, error) {
args := s.Called(ctx, userID, from, through, matchers)
return args.Get(0).([]chunk.Chunk), args.Error(1)
}

func (s *storeMock) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, matchers ...*labels.Matcher) ([][]chunk.Chunk, []*chunk.Fetcher, error) {
args := s.Called(ctx, userID, from, through, matchers)
return args.Get(0).([][]chunk.Chunk), args.Get(0).([]*chunk.Fetcher), args.Error(2)
Expand All @@ -303,14 +298,6 @@ func (s *storeMock) LabelNamesForMetricName(ctx context.Context, userID string,
return args.Get(0).([]string), args.Error(1)
}

func (s *storeMock) DeleteChunk(ctx context.Context, from, through model.Time, userID, chunkID string, metric labels.Labels, partiallyDeletedInterval *model.Interval) error {
panic("don't call me please")
}

func (s *storeMock) DeleteSeriesIDs(ctx context.Context, from, through model.Time, userID string, metric labels.Labels) error {
panic("don't call me please")
}

func (s *storeMock) GetChunkFetcher(_ model.Time) *chunk.Fetcher {
panic("don't call me please")
}
Expand Down
8 changes: 0 additions & 8 deletions pkg/storage/chunk/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,3 @@ func (c *Chunk) Slice(from, through model.Time) (*Chunk, error) {
nc := NewChunk(c.UserID, c.Fingerprint, c.Metric, pc, from, through)
return &nc, nil
}

func intervalsOverlap(interval1, interval2 model.Interval) bool {
if interval1.Start > interval2.End || interval2.Start > interval1.End {
return false
}

return true
}
Loading

0 comments on commit 59bd44a

Please sign in to comment.