Skip to content

Commit

Permalink
Remove Thanos ZLabel type in favour of identical LabelAdapter type (g…
Browse files Browse the repository at this point in the history
…rafana#3345)

* labelpb: remove unused LabelSet type

* Replace ZLabel with alias to LabelAdapter

The implementations are identical.

* Remove unused storegateway/prompb

* storegateway: convert uses of ZLabel to LabelAdapter

Avoid having two names for the same thing.

* go mod tidy: xxhash dependency is now indirect

* Make imports of gogo.proto consistent

So everything compiles and lint errors go away.
  • Loading branch information
bboreham authored and mason committed Nov 4, 2022
1 parent 407e619 commit 8702e3b
Show file tree
Hide file tree
Showing 23 changed files with 161 additions and 4,610 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ pkg/distributor/ha_tracker.pb.go: pkg/distributor/ha_tracker.proto
pkg/ruler/rulespb/rules.pb.go: pkg/ruler/rulespb/rules.proto
pkg/ruler/ruler.pb.go: pkg/ruler/ruler.proto
pkg/scheduler/schedulerpb/scheduler.pb.go: pkg/scheduler/schedulerpb/scheduler.proto
pkg/storegateway/labelpb/types.pb.go: pkg/storegateway/labelpb/types.proto
pkg/storegateway/prompb/types.pb.go: pkg/storegateway/prompb/types.proto
pkg/storegateway/hintspb/hints.pb.go: pkg/storegateway/hintspb/hints.proto
pkg/storegateway/storegatewaypb/gateway.pb.go: pkg/storegateway/storegatewaypb/gateway.proto
pkg/storegateway/storepb/rpc.pb.go: pkg/storegateway/storepb/rpc.proto
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ require (
github.com/alecthomas/chroma v0.10.0
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/cespare/xxhash v1.1.0
github.com/cespare/xxhash/v2 v2.1.2
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/google/go-cmp v0.5.9
Expand Down Expand Up @@ -103,6 +102,7 @@ require (
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chromedp/cdproto v0.0.0-20220629234738-4cfc9cdeeb92 // indirect
github.com/chromedp/chromedp v0.8.2 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
Expand Down
6 changes: 3 additions & 3 deletions pkg/querier/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb/chunkenc"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storage/series"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
)

Expand Down Expand Up @@ -61,15 +61,15 @@ func (bqss *blockQuerierSeriesSet) Next() bool {
return false
}

currLabels := labelpb.ZLabelsToPromLabels(bqss.series[bqss.next].Labels)
currLabels := mimirpb.FromLabelAdaptersToLabels(bqss.series[bqss.next].Labels)
currChunks := bqss.series[bqss.next].Chunks

bqss.next++

// Merge chunks for current series. Chunks may come in multiple responses, but as soon
// as the response has chunks for a new series, we can stop searching. Series are sorted.
// See documentation for StoreClient.Series call for details.
for bqss.next < len(bqss.series) && labels.Compare(currLabels, labelpb.ZLabelsToPromLabels(bqss.series[bqss.next].Labels)) == 0 {
for bqss.next < len(bqss.series) && labels.Compare(currLabels, mimirpb.FromLabelAdaptersToLabels(bqss.series[bqss.next].Labels)) == 0 {
currChunks = append(currChunks, bqss.series[bqss.next].Chunks...)
bqss.next++
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/querier/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/util"
)
Expand All @@ -46,7 +46,7 @@ func TestBlockQuerierSeries(t *testing.T) {
},
"should return series on success": {
series: &storepb.Series{
Labels: []labelpb.ZLabel{
Labels: []mimirpb.LabelAdapter{
{Name: "foo", Value: "bar"},
},
Chunks: []storepb.AggrChunk{
Expand All @@ -61,7 +61,7 @@ func TestBlockQuerierSeries(t *testing.T) {
},
"should return error on failure while reading encoded chunk data": {
series: &storepb.Series{
Labels: []labelpb.ZLabel{{Name: "foo", Value: "bar"}},
Labels: []mimirpb.LabelAdapter{{Name: "foo", Value: "bar"}},
Chunks: []storepb.AggrChunk{
{MinTime: minTimestamp.Unix() * 1000, MaxTime: maxTimestamp.Unix() * 1000, Raw: &storepb.Chunk{Type: storepb.Chunk_XOR, Data: []byte{0, 1}}},
},
Expand All @@ -75,7 +75,7 @@ func TestBlockQuerierSeries(t *testing.T) {
testData := testData

t.Run(testName, func(t *testing.T) {
series := newBlockQuerierSeries(labelpb.ZLabelsToPromLabels(testData.series.Labels), testData.series.Chunks)
series := newBlockQuerierSeries(mimirpb.FromLabelAdaptersToLabels(testData.series.Labels), testData.series.Chunks)

assert.Equal(t, testData.expectedMetric, series.Labels())

Expand Down Expand Up @@ -412,11 +412,11 @@ func createAggrChunk(minTime, maxTime int64, samples ...promql.Point) storepb.Ag
}
}

func mkZLabels(s ...string) []labelpb.ZLabel {
var result []labelpb.ZLabel
func mkZLabels(s ...string) []mimirpb.LabelAdapter {
var result []mimirpb.LabelAdapter

for i := 0; i+1 < len(s); i = i + 2 {
result = append(result, labelpb.ZLabel{
result = append(result, mimirpb.LabelAdapter{
Name: s[i],
Value: s[i+1],
})
Expand All @@ -426,7 +426,7 @@ func mkZLabels(s ...string) []labelpb.ZLabel {
}

func mkLabels(s ...string) []labels.Label {
return labelpb.ZLabelsToPromLabels(mkZLabels(s...))
return mimirpb.FromLabelAdaptersToLabels(mkZLabels(s...))
}

func Benchmark_newBlockQuerierSeries(b *testing.B) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/querier/blocks_store_queryable.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"golang.org/x/sync/errgroup"
grpc_metadata "google.golang.org/grpc/metadata"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/querier/stats"
"github.com/grafana/mimir/pkg/storage/bucket"
"github.com/grafana/mimir/pkg/storage/series"
Expand Down Expand Up @@ -749,7 +748,7 @@ func (q *blocksStoreQuerier) fetchSeriesFromStores(
mySeries = append(mySeries, s)

// Add series fingerprint to query limiter; will return error if we are over the limit
limitErr := queryLimiter.AddSeries(mimirpb.FromLabelsToLabelAdapters(s.PromLabels()))
limitErr := queryLimiter.AddSeries(s.Labels)
if limitErr != nil {
return validation.LimitError(limitErr.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/querier/blocks_store_queryable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"github.com/weaveworks/common/user"
"google.golang.org/grpc"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storage/sharding"
"github.com/grafana/mimir/pkg/storage/tsdb/bucketindex"
"github.com/grafana/mimir/pkg/storegateway/hintspb"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storegatewaypb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/util"
Expand Down Expand Up @@ -1922,7 +1922,7 @@ func mockSeriesResponseWithChunks(lbls labels.Labels, chunks ...storepb.AggrChun
return &storepb.SeriesResponse{
Result: &storepb.SeriesResponse_Series{
Series: &storepb.Series{
Labels: labelpb.ZLabelsFromPromLabels(lbls),
Labels: mimirpb.FromLabelsToLabelAdapters(lbls),
Chunks: chunks,
},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/storegateway/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storage/sharding"
mimir_tsdb "github.com/grafana/mimir/pkg/storage/tsdb"
"github.com/grafana/mimir/pkg/storage/tsdb/block"
"github.com/grafana/mimir/pkg/storage/tsdb/metadata"
"github.com/grafana/mimir/pkg/storegateway/hintspb"
"github.com/grafana/mimir/pkg/storegateway/indexcache"
"github.com/grafana/mimir/pkg/storegateway/indexheader"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/util"
"github.com/grafana/mimir/pkg/util/gate"
Expand Down Expand Up @@ -1033,7 +1033,7 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, srv storepb.Store_Serie
stats.mergedChunksCount += len(series.Chunks)
s.metrics.chunkSizeBytes.Observe(float64(chunksSize(series.Chunks)))
}
series.Labels = labelpb.ZLabelsFromPromLabels(lset)
series.Labels = mimirpb.FromLabelsToLabelAdapters(lset)
if err = srv.Send(storepb.NewSeriesResponse(&series)); err != nil {
err = status.Error(codes.Unknown, errors.Wrap(err, "send series response").Error())
return
Expand Down
22 changes: 11 additions & 11 deletions pkg/storegateway/bucket_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
"github.com/weaveworks/common/httpgrpc"
"google.golang.org/grpc/codes"

"github.com/grafana/mimir/pkg/mimirpb"
mimir_tsdb "github.com/grafana/mimir/pkg/storage/tsdb"
"github.com/grafana/mimir/pkg/storage/tsdb/block"
"github.com/grafana/mimir/pkg/storage/tsdb/metadata"
"github.com/grafana/mimir/pkg/storegateway/indexcache"
"github.com/grafana/mimir/pkg/storegateway/indexheader"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/storegateway/testhelper"
)
Expand Down Expand Up @@ -216,7 +216,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
// TODO(bwplotka): Add those test cases to TSDB querier_test.go as well, there are no tests for matching.
for i, tcase := range []struct {
req *storepb.SeriesRequest
expected [][]labelpb.ZLabel
expected [][]mimirpb.LabelAdapter
expectedChunkLen int
}{
{
Expand All @@ -228,7 +228,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand All @@ -248,7 +248,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand All @@ -264,7 +264,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand All @@ -280,7 +280,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand All @@ -300,7 +300,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand All @@ -320,7 +320,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "2"}, {Name: "b", Value: "2"}},
},
Expand All @@ -334,7 +334,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand All @@ -350,7 +350,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
MaxTime: maxt,
},
expectedChunkLen: 3,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand Down Expand Up @@ -384,7 +384,7 @@ func testBucketStore_e2e(t *testing.T, ctx context.Context, s *storeSuite) {
SkipChunks: true,
},
expectedChunkLen: 0,
expected: [][]labelpb.ZLabel{
expected: [][]mimirpb.LabelAdapter{
{{Name: "a", Value: "1"}, {Name: "b", Value: "1"}},
{{Name: "a", Value: "1"}, {Name: "b", Value: "2"}},
{{Name: "a", Value: "1"}, {Name: "c", Value: "1"}},
Expand Down
8 changes: 4 additions & 4 deletions pkg/storegateway/bucket_stores_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ import (
"go.uber.org/atomic"
grpc_metadata "google.golang.org/grpc/metadata"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storage/bucket"
"github.com/grafana/mimir/pkg/storage/bucket/filesystem"
mimir_tsdb "github.com/grafana/mimir/pkg/storage/tsdb"
"github.com/grafana/mimir/pkg/storage/tsdb/block"
"github.com/grafana/mimir/pkg/storage/tsdb/metadata"
mimir_testutil "github.com/grafana/mimir/pkg/storage/tsdb/testutil"
"github.com/grafana/mimir/pkg/storegateway/indexcache"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/util"
"github.com/grafana/mimir/pkg/util/test"
Expand Down Expand Up @@ -92,7 +92,7 @@ func TestBucketStores_InitialSync(t *testing.T) {
require.NoError(t, err)
assert.Empty(t, warnings)
require.Len(t, seriesSet, 1)
assert.Equal(t, []labelpb.ZLabel{{Name: labels.MetricName, Value: metricName}}, seriesSet[0].Labels)
assert.Equal(t, []mimirpb.LabelAdapter{{Name: labels.MetricName, Value: metricName}}, seriesSet[0].Labels)
}

// Query series of another user.
Expand Down Expand Up @@ -161,7 +161,7 @@ func TestBucketStores_InitialSyncShouldRetryOnFailure(t *testing.T) {
require.NoError(t, err)
assert.Empty(t, warnings)
require.Len(t, seriesSet, 1)
assert.Equal(t, []labelpb.ZLabel{{Name: labels.MetricName, Value: "series_1"}}, seriesSet[0].Labels)
assert.Equal(t, []mimirpb.LabelAdapter{{Name: labels.MetricName, Value: "series_1"}}, seriesSet[0].Labels)

assert.NoError(t, testutil.GatherAndCompare(reg, strings.NewReader(`
# HELP cortex_blocks_meta_syncs_total Total blocks metadata synchronization attempts
Expand Down Expand Up @@ -232,7 +232,7 @@ func TestBucketStores_SyncBlocks(t *testing.T) {
require.NoError(t, err)
assert.Empty(t, warnings)
assert.Len(t, seriesSet, 1)
assert.Equal(t, []labelpb.ZLabel{{Name: labels.MetricName, Value: metricName}}, seriesSet[0].Labels)
assert.Equal(t, []mimirpb.LabelAdapter{{Name: labels.MetricName, Value: metricName}}, seriesSet[0].Labels)

assert.NoError(t, testutil.GatherAndCompare(reg, strings.NewReader(`
# HELP cortex_bucket_store_blocks_loaded Number of currently loaded blocks.
Expand Down
4 changes: 2 additions & 2 deletions pkg/storegateway/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ import (
"github.com/thanos-io/objstore/providers/filesystem"
"go.uber.org/atomic"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storage/sharding"
mimir_tsdb "github.com/grafana/mimir/pkg/storage/tsdb"
"github.com/grafana/mimir/pkg/storage/tsdb/block"
"github.com/grafana/mimir/pkg/storage/tsdb/metadata"
"github.com/grafana/mimir/pkg/storegateway/hintspb"
"github.com/grafana/mimir/pkg/storegateway/indexcache"
"github.com/grafana/mimir/pkg/storegateway/indexheader"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/util/gate"
"github.com/grafana/mimir/pkg/util/pool"
Expand Down Expand Up @@ -2268,7 +2268,7 @@ func createHeadWithSeries(t testing.TB, j int, opts headGenOptions) (*tsdb.Head,
var lset labels.Labels

assert.NoError(t, ir.Series(all.At(), &lset, &chunkMetas))
expected = append(expected, &storepb.Series{Labels: labelpb.ZLabelsFromPromLabels(lset)})
expected = append(expected, &storepb.Series{Labels: mimirpb.FromLabelsToLabelAdapters(lset)})

if opts.SkipChunks {
continue
Expand Down
4 changes: 2 additions & 2 deletions pkg/storegateway/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"github.com/thanos-io/objstore"
"google.golang.org/grpc/status"

"github.com/grafana/mimir/pkg/mimirpb"
"github.com/grafana/mimir/pkg/storage/bucket"
"github.com/grafana/mimir/pkg/storage/bucket/filesystem"
"github.com/grafana/mimir/pkg/storage/sharding"
Expand All @@ -49,7 +50,6 @@ import (
"github.com/grafana/mimir/pkg/storage/tsdb/bucketindex"
"github.com/grafana/mimir/pkg/storage/tsdb/metadata"
mimir_testutil "github.com/grafana/mimir/pkg/storage/tsdb/testutil"
"github.com/grafana/mimir/pkg/storegateway/labelpb"
"github.com/grafana/mimir/pkg/storegateway/storepb"
"github.com/grafana/mimir/pkg/util"
"github.com/grafana/mimir/pkg/util/test"
Expand Down Expand Up @@ -1062,7 +1062,7 @@ func TestStoreGateway_SeriesQueryingShouldRemoveExternalLabels(t *testing.T) {
actual := srv.SeriesSet[seriesID]

// Ensure Mimir external labels have been removed.
assert.Equal(t, []labelpb.ZLabel{{Name: "series_id", Value: strconv.Itoa(seriesID)}}, actual.Labels)
assert.Equal(t, []mimirpb.LabelAdapter{{Name: "series_id", Value: strconv.Itoa(seriesID)}}, actual.Labels)

// Ensure samples have been correctly queried. The Thanos store also deduplicate samples
// in most cases, but it's not strictly required guaranteeing deduplication at this stage.
Expand Down
Loading

0 comments on commit 8702e3b

Please sign in to comment.