From 2f858cb6b2aee637f202af2dce023c343814df69 Mon Sep 17 00:00:00 2001 From: Filip Petkovski Date: Thu, 19 Jan 2023 10:07:18 +0100 Subject: [PATCH] Support native histograms in store-gateway --- pkg/query/iter.go | 2 + pkg/store/bucket.go | 6 +- pkg/store/bucket_test.go | 30 ++++++--- pkg/store/storepb/testutil/series.go | 92 ++++++++++++++++++++++------ pkg/store/storepb/types.pb.go | 78 ++++++++++++----------- pkg/store/storepb/types.proto | 1 + 6 files changed, 142 insertions(+), 67 deletions(-) diff --git a/pkg/query/iter.go b/pkg/query/iter.go index e0fb8e2c125..b92f3bf4f2e 100644 --- a/pkg/query/iter.go +++ b/pkg/query/iter.go @@ -238,6 +238,8 @@ func chunkEncoding(e storepb.Chunk_Encoding) chunkenc.Encoding { switch e { case storepb.Chunk_XOR: return chunkenc.EncXOR + case storepb.Chunk_Histogram: + return chunkenc.EncHistogram } return 255 // Invalid. } diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index b1fbd898a25..c69f3e3d07d 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -1024,14 +1024,16 @@ func populateChunk(out *storepb.AggrChunk, in chunkenc.Chunk, aggrs []storepb.Ag hasher := hashPool.Get().(hash.Hash64) defer hashPool.Put(hasher) - if in.Encoding() == chunkenc.EncXOR { + if in.Encoding() == chunkenc.EncXOR || in.Encoding() == chunkenc.EncHistogram { b, err := save(in.Bytes()) if err != nil { return err } - out.Raw = &storepb.Chunk{Type: storepb.Chunk_XOR, Data: b, Hash: hashChunk(hasher, b, calculateChecksum)} + storeEnc := storepb.Chunk_Encoding(in.Encoding() - 1) + out.Raw = &storepb.Chunk{Type: storeEnc, Data: b, Hash: hashChunk(hasher, b, calculateChecksum)} return nil } + if in.Encoding() != downsample.ChunkEncAggr { return errors.Errorf("unsupported chunk encoding %d", in.Encoding()) } diff --git a/pkg/store/bucket_test.go b/pkg/store/bucket_test.go index c115be4d6b7..30447bf9018 100644 --- a/pkg/store/bucket_test.go +++ b/pkg/store/bucket_test.go @@ -30,7 +30,6 @@ import ( "github.com/leanovate/gopter/gen" "github.com/leanovate/gopter/prop" "github.com/oklog/ulid" - "github.com/prometheus/client_golang/prometheus" promtest "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/prometheus/model/labels" @@ -45,6 +44,7 @@ import ( "github.com/thanos-io/objstore/providers/filesystem" "github.com/efficientgo/core/testutil" + "github.com/thanos-io/thanos/pkg/block" "github.com/thanos-io/thanos/pkg/block/indexheader" "github.com/thanos-io/thanos/pkg/block/metadata" @@ -1238,14 +1238,21 @@ func benchmarkExpandedPostings( func TestBucketSeries(t *testing.T) { tb := testutil.NewTB(t) storetestutil.RunSeriesInterestingCases(tb, 200e3, 200e3, func(t testutil.TB, samplesPerSeries, series int) { - benchBucketSeries(t, false, samplesPerSeries, series, 1) + benchBucketSeries(t, chunkenc.ValFloat, false, samplesPerSeries, series, 1) + }) +} + +func TestBucketHistogramSeries(t *testing.T) { + tb := testutil.NewTB(t) + storetestutil.RunSeriesInterestingCases(tb, 200e3, 200e3, func(t testutil.TB, samplesPerSeries, series int) { + benchBucketSeries(t, chunkenc.ValHistogram, false, samplesPerSeries, series, 1) }) } func TestBucketSkipChunksSeries(t *testing.T) { tb := testutil.NewTB(t) storetestutil.RunSeriesInterestingCases(tb, 200e3, 200e3, func(t testutil.TB, samplesPerSeries, series int) { - benchBucketSeries(t, true, samplesPerSeries, series, 1) + benchBucketSeries(t, chunkenc.ValFloat, true, samplesPerSeries, series, 1) }) } @@ -1253,7 +1260,7 @@ func BenchmarkBucketSeries(b *testing.B) { tb := testutil.NewTB(b) // 10e6 samples = ~1736 days with 15s scrape storetestutil.RunSeriesInterestingCases(tb, 10e6, 10e5, func(t testutil.TB, samplesPerSeries, series int) { - benchBucketSeries(t, false, samplesPerSeries, series, 1/100e6, 1/10e4, 1) + benchBucketSeries(t, chunkenc.ValFloat, false, samplesPerSeries, series, 1/100e6, 1/10e4, 1) }) } @@ -1261,11 +1268,11 @@ func BenchmarkBucketSkipChunksSeries(b *testing.B) { tb := testutil.NewTB(b) // 10e6 samples = ~1736 days with 15s scrape storetestutil.RunSeriesInterestingCases(tb, 10e6, 10e5, func(t testutil.TB, samplesPerSeries, series int) { - benchBucketSeries(t, true, samplesPerSeries, series, 1/100e6, 1/10e4, 1) + benchBucketSeries(t, chunkenc.ValFloat, true, samplesPerSeries, series, 1/100e6, 1/10e4, 1) }) } -func benchBucketSeries(t testutil.TB, skipChunk bool, samplesPerSeries, totalSeries int, requestedRatios ...float64) { +func benchBucketSeries(t testutil.TB, sampleType chunkenc.ValueType, skipChunk bool, samplesPerSeries, totalSeries int, requestedRatios ...float64) { const numOfBlocks = 4 tmpDir := t.TempDir() @@ -1303,17 +1310,24 @@ func benchBucketSeries(t testutil.TB, skipChunk bool, samplesPerSeries, totalSer // Timestamp will be counted for each new series and new sample, so each each series will have unique timestamp. // This allows to pick time range that will correspond to number of series picked 1:1. for bi := 0; bi < numOfBlocks; bi++ { - head, bSeries := storetestutil.CreateHeadWithSeries(t, bi, storetestutil.HeadGenOptions{ + head, _ := storetestutil.CreateHeadWithSeries(t, bi, storetestutil.HeadGenOptions{ TSDBDir: filepath.Join(tmpDir, fmt.Sprintf("%d", bi)), SamplesPerSeries: samplesPerSeriesPerBlock, Series: seriesPerBlock, PrependLabels: extLset, Random: random, SkipChunks: t.IsBenchmark() || skipChunk, + SampleType: sampleType, }) id := createBlockFromHead(t, blockDir, head) testutil.Ok(t, head.Close()) - series = append(series, bSeries...) + + // Histogram chunks are represented differently in-memory and on disk. In order to + // have a precise comparison, we need to use the on-disk chunks as the expected values + // instead of the in-memory ones. + diskBlock, err := tsdb.OpenBlock(logger, path.Join(blockDir, id.String()), nil) + testutil.Ok(t, err) + series = append(series, storetestutil.ReadSeriesFromBlock(t, diskBlock, extLset, skipChunk)...) meta, err := metadata.InjectThanos(logger, filepath.Join(blockDir, id.String()), thanosMeta, nil) testutil.Ok(t, err) diff --git a/pkg/store/storepb/testutil/series.go b/pkg/store/storepb/testutil/series.go index 64baf181d5e..083eb5d9d51 100644 --- a/pkg/store/storepb/testutil/series.go +++ b/pkg/store/storepb/testutil/series.go @@ -16,6 +16,11 @@ import ( "time" "github.com/cespare/xxhash" + "github.com/prometheus/prometheus/model/histogram" + "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/tsdb/chunkenc" + "github.com/stretchr/testify/require" + "go.uber.org/atomic" "github.com/gogo/protobuf/types" "github.com/prometheus/prometheus/model/labels" @@ -25,6 +30,7 @@ import ( "github.com/prometheus/prometheus/tsdb/wlog" "github.com/efficientgo/core/testutil" + "github.com/thanos-io/thanos/pkg/store/hintspb" "github.com/thanos-io/thanos/pkg/store/labelpb" "github.com/thanos-io/thanos/pkg/store/storepb" @@ -50,6 +56,7 @@ type HeadGenOptions struct { WithWAL bool PrependLabels labels.Labels SkipChunks bool // Skips chunks in returned slice (not in generated head!). + SampleType chunkenc.ValueType Random *rand.Rand } @@ -85,27 +92,26 @@ func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, headOpts := tsdb.DefaultHeadOptions() headOpts.ChunkDirRoot = opts.TSDBDir + headOpts.EnableNativeHistograms = *atomic.NewBool(true) h, err := tsdb.NewHead(nil, nil, w, nil, headOpts, nil) testutil.Ok(t, err) app := h.Appender(context.Background()) for i := 0; i < opts.Series; i++ { tsLabel := j*opts.Series*opts.SamplesPerSeries + i*opts.SamplesPerSeries - ref, err := app.Append( - 0, - labels.FromStrings("foo", "bar", "i", fmt.Sprintf("%07d%s", tsLabel, LabelLongSuffix)), - int64(tsLabel)*opts.ScrapeInterval.Milliseconds(), - opts.Random.Float64(), - ) - testutil.Ok(t, err) - - for is := 1; is < opts.SamplesPerSeries; is++ { - _, err := app.Append(ref, nil, int64(tsLabel+is)*opts.ScrapeInterval.Milliseconds(), opts.Random.Float64()) - testutil.Ok(t, err) + switch opts.SampleType { + case chunkenc.ValFloat: + appendFloatSamples(t, app, tsLabel, opts) + case chunkenc.ValHistogram: + appendHistogramSamples(t, app, tsLabel, opts) } } testutil.Ok(t, app.Commit()) + return h, ReadSeriesFromBlock(t, h, opts.PrependLabels, opts.SkipChunks) +} + +func ReadSeriesFromBlock(t testing.TB, h tsdb.BlockReader, extLabels labels.Labels, skipChunks bool) []*storepb.Series { // Use TSDB and get all series for assertion. chks, err := h.Chunks() testutil.Ok(t, err) @@ -118,15 +124,15 @@ func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, var ( lset labels.Labels chunkMetas []chunks.Meta - expected = make([]*storepb.Series, 0, opts.Series) + expected = make([]*storepb.Series, 0) ) all := allPostings(t, ir) for all.Next() { testutil.Ok(t, ir.Series(all.At(), &lset, &chunkMetas)) - expected = append(expected, &storepb.Series{Labels: labelpb.ZLabelsFromPromLabels(append(opts.PrependLabels.Copy(), lset...))}) + expected = append(expected, &storepb.Series{Labels: labelpb.ZLabelsFromPromLabels(append(extLabels.Copy(), lset...))}) - if opts.SkipChunks { + if skipChunks { continue } @@ -139,15 +145,59 @@ func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, c.MaxTime = c.MinTime + int64(chEnc.NumSamples()) - 1 } + storeChunkEnc := storepb.Chunk_Encoding(chEnc.Encoding() - 1) expected[len(expected)-1].Chunks = append(expected[len(expected)-1].Chunks, storepb.AggrChunk{ MinTime: c.MinTime, MaxTime: c.MaxTime, - Raw: &storepb.Chunk{Type: storepb.Chunk_XOR, Data: chEnc.Bytes(), Hash: xxhash.Sum64(chEnc.Bytes())}, + Raw: &storepb.Chunk{Type: storeChunkEnc, Data: chEnc.Bytes(), Hash: xxhash.Sum64(chEnc.Bytes())}, }) } } testutil.Ok(t, all.Err()) - return h, expected + return expected +} + +func appendFloatSamples(t testing.TB, app storage.Appender, tsLabel int, opts HeadGenOptions) { + ref, err := app.Append( + 0, + labels.FromStrings("foo", "bar", "i", fmt.Sprintf("%07d%s", tsLabel, LabelLongSuffix)), + int64(tsLabel)*opts.ScrapeInterval.Milliseconds(), + opts.Random.Float64(), + ) + testutil.Ok(t, err) + + for is := 1; is < opts.SamplesPerSeries; is++ { + _, err := app.Append(ref, nil, int64(tsLabel+is)*opts.ScrapeInterval.Milliseconds(), opts.Random.Float64()) + testutil.Ok(t, err) + } +} + +func appendHistogramSamples(t testing.TB, app storage.Appender, tsLabel int, opts HeadGenOptions) { + sample := &histogram.Histogram{ + Schema: 0, + Count: 9, + Sum: -3.1415, + ZeroCount: 12, + ZeroThreshold: 0.001, + NegativeSpans: []histogram.Span{ + {Offset: 0, Length: 4}, + {Offset: 1, Length: 1}, + }, + NegativeBuckets: []int64{1, 2, -2, 1, -1}, + } + + ref, err := app.AppendHistogram( + 0, + labels.FromStrings("foo", "bar", "i", fmt.Sprintf("%07d%s", tsLabel, LabelLongSuffix)), + int64(tsLabel)*opts.ScrapeInterval.Milliseconds(), + sample, + ) + testutil.Ok(t, err) + + for is := 1; is < opts.SamplesPerSeries; is++ { + _, err := app.AppendHistogram(ref, nil, int64(tsLabel+is)*opts.ScrapeInterval.Milliseconds(), sample) + testutil.Ok(t, err) + } } // SeriesServer is test gRPC storeAPI series server. @@ -252,20 +302,22 @@ func TestServerSeries(t testutil.TB, store storepb.StoreServer, cases ...*Series } // Huge responses can produce unreadable diffs - make it more human readable. - if len(c.ExpectedSeries) > 4 { + if len(c.ExpectedSeries) > 1 { for j := range c.ExpectedSeries { testutil.Equals(t, c.ExpectedSeries[j].Labels, srv.SeriesSet[j].Labels, "%v series chunks mismatch", j) // Check chunks when it is not a skip chunk query if !c.Req.SkipChunks { if len(c.ExpectedSeries[j].Chunks) > 20 { - testutil.Equals(t, len(c.ExpectedSeries[j].Chunks), len(srv.SeriesSet[j].Chunks), "%v series chunks number mismatch", j) + require.Equal(t, len(c.ExpectedSeries[j].Chunks), len(srv.SeriesSet[j].Chunks), "%v series chunks number mismatch", j) + } + for ci := range c.ExpectedSeries[j].Chunks { + testutil.Equals(t, c.ExpectedSeries[j].Chunks[ci], srv.SeriesSet[j].Chunks[ci], "%v series chunks mismatch %v", j, ci) } - testutil.Equals(t, c.ExpectedSeries[j].Chunks, srv.SeriesSet[j].Chunks, "%v series chunks mismatch", j) } } } else { - testutil.Equals(t, c.ExpectedSeries, srv.SeriesSet) + require.Equal(t, c.ExpectedSeries, srv.SeriesSet) } var actualHints []hintspb.SeriesResponseHints diff --git a/pkg/store/storepb/types.pb.go b/pkg/store/storepb/types.pb.go index 271a785bf51..317964dd503 100644 --- a/pkg/store/storepb/types.pb.go +++ b/pkg/store/storepb/types.pb.go @@ -63,15 +63,18 @@ func (PartialResponseStrategy) EnumDescriptor() ([]byte, []int) { type Chunk_Encoding int32 const ( - Chunk_XOR Chunk_Encoding = 0 + Chunk_XOR Chunk_Encoding = 0 + Chunk_Histogram Chunk_Encoding = 1 ) var Chunk_Encoding_name = map[int32]string{ 0: "XOR", + 1: "Histogram", } var Chunk_Encoding_value = map[string]int32{ - "XOR": 0, + "XOR": 0, + "Histogram": 1, } func (x Chunk_Encoding) String() string { @@ -287,41 +290,42 @@ func init() { func init() { proto.RegisterFile("store/storepb/types.proto", fileDescriptor_121fba57de02d8e0) } var fileDescriptor_121fba57de02d8e0 = []byte{ - // 536 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xf5, 0xda, 0x8e, 0x93, 0xcc, 0xaf, 0x3f, 0x64, 0x96, 0x0a, 0xdc, 0x1e, 0x9c, 0xc8, 0x08, - 0x11, 0x55, 0xaa, 0x2d, 0x15, 0x8e, 0x5c, 0x12, 0x94, 0x1b, 0xb4, 0x74, 0x1b, 0x09, 0xd4, 0x0b, - 0xda, 0xb8, 0x2b, 0xdb, 0x6a, 0xfc, 0x47, 0xf6, 0xba, 0x24, 0xdf, 0x02, 0xc4, 0x9d, 0xcf, 0x93, - 0x63, 0x8f, 0x88, 0x43,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 0x1d, 0x5f, 0x9a, 0x4a, 0xb5, 0x39, 0xe7, 0xe3, 0x4b, 0x93, 0x54, 0x00, 0x1b, 0x9b, 0x2a, 0x02, - 0x6c, 0x6c, 0x6a, 0x27, 0x2e, 0x3c, 0x79, 0xc7, 0x73, 0x19, 0xf1, 0x19, 0x13, 0x45, 0x96, 0x26, - 0x85, 0xb8, 0x92, 0x39, 0x97, 0x22, 0x58, 0xd0, 0x0e, 0xe8, 0xef, 0x87, 0xec, 0xdc, 0x54, 0x68, - 0x17, 0x5a, 0xc3, 0xd1, 0x05, 0x9b, 0x98, 0x64, 0xf4, 0x6c, 0xf9, 0xcb, 0x56, 0x96, 0x6b, 0x9b, - 0xdc, 0xaf, 0x6d, 0xf2, 0x73, 0x6d, 0x93, 0xcf, 0x1b, 0x5b, 0xb9, 0xdf, 0xd8, 0xca, 0xf7, 0x8d, - 0xad, 0x5c, 0xb7, 0x9b, 0xe7, 0x35, 0x35, 0xf0, 0x81, 0xbc, 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, - 0x13, 0xe7, 0xb3, 0x25, 0x76, 0x03, 0x00, 0x00, + // 550 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xbd, 0xb6, 0xe3, 0x24, 0x43, 0x8b, 0xcc, 0xaa, 0x02, 0xb7, 0x07, 0x27, 0x32, 0x42, + 0x44, 0x95, 0x6a, 0x4b, 0x85, 0x23, 0x97, 0x06, 0x45, 0xe2, 0x00, 0x2d, 0xdd, 0x56, 0x02, 0xf5, + 0x82, 0x36, 0xee, 0xca, 0x5e, 0x35, 0xf6, 0x5a, 0xde, 0x35, 0xa4, 0x0f, 0xc0, 0x1d, 0xc4, 0x9d, + 0xe7, 0xc9, 0xb1, 0x47, 0xc4, 0xa1, 0x82, 0xe6, 0x45, 0x90, 0xd7, 0x0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ae, 0xe3, 0xb0, 0x03, 0xe6, 0xe4, 0xd4, 0x35, + 0xea, 0x45, 0x3a, 0x9e, 0x9c, 0xba, 0xa8, 0x76, 0x90, 0x89, 0x6b, 0x6a, 0x07, 0x99, 0xb8, 0xd6, + 0x7e, 0x08, 0x8f, 0xde, 0xd2, 0x52, 0x71, 0x3a, 0x23, 0x4c, 0x16, 0x22, 0x97, 0xec, 0x4c, 0x95, + 0x54, 0xb1, 0xe4, 0x1a, 0xf7, 0xc0, 0x7e, 0x77, 0x44, 0x8e, 0x5d, 0x03, 0xf7, 0xa1, 0x73, 0x34, + 0x3e, 0x21, 0xe7, 0x2e, 0x1a, 0x3f, 0x59, 0xfc, 0xf6, 0x8d, 0xc5, 0x9d, 0x8f, 0x6e, 0xee, 0x7c, + 0xf4, 0xeb, 0xce, 0x47, 0x5f, 0x96, 0xbe, 0x71, 0xb3, 0xf4, 0x8d, 0x1f, 0x4b, 0xdf, 0xb8, 0xe8, + 0xb6, 0xcf, 0x6d, 0xea, 0xe8, 0x07, 0xf3, 0xec, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x35, + 0xc2, 0xb4, 0x86, 0x03, 0x00, 0x00, } func (m *Chunk) Marshal() (dAtA []byte, err error) { diff --git a/pkg/store/storepb/types.proto b/pkg/store/storepb/types.proto index 3739e23b8f4..dd0ce3012e8 100644 --- a/pkg/store/storepb/types.proto +++ b/pkg/store/storepb/types.proto @@ -23,6 +23,7 @@ option (gogoproto.goproto_sizecache_all) = false; message Chunk { enum Encoding { XOR = 0; + Histogram = 1; } Encoding type = 1; bytes data = 2;