diff --git a/pkg/mimirpb/compat.go b/pkg/mimirpb/compat.go index 922d3058bfe..db83601361b 100644 --- a/pkg/mimirpb/compat.go +++ b/pkg/mimirpb/compat.go @@ -30,7 +30,7 @@ import ( // method implies that only a single sample and optionally exemplar can be set for each series. // // For histograms use NewWriteRequest and Add* functions to build write request with Floats and Histograms -func ToWriteRequest(lbls [][]mimirpb_custom.LabelAdapter, samples []Sample, exemplars []*Exemplar, metadata []*MetricMetadata, source WriteRequest_SourceEnum) *WriteRequest { +func ToWriteRequest(lbls [][]*mimirpb_custom.LabelAdapter, samples []*Sample, exemplars []*Exemplar, metadata []*MetricMetadata, source WriteRequest_SourceEnum) *WriteRequest { return NewWriteRequest(metadata, source).AddFloatSeries(lbls, samples, exemplars) } @@ -46,7 +46,7 @@ func NewWriteRequest(metadata []*MetricMetadata, source WriteRequest_SourceEnum) // AddFloatSeries converts matched slices of Labels, Samples, Exemplars into a WriteRequest // proto. It gets timeseries from the pool, so ReuseSlice() should be called when done. Note that this // method implies that only a single sample and optionally exemplar can be set for each series. -func (req *WriteRequest) AddFloatSeries(lbls [][]mimirpb_custom.LabelAdapter, samples []Sample, exemplars []*Exemplar) *WriteRequest { +func (req *WriteRequest) AddFloatSeries(lbls [][]*mimirpb_custom.LabelAdapter, samples []*Sample, exemplars []*Exemplar) *WriteRequest { for i, s := range samples { ts := TimeseriesFromPool() ts.Labels = append(ts.Labels, lbls[i]...) @@ -56,7 +56,7 @@ func (req *WriteRequest) AddFloatSeries(lbls [][]mimirpb_custom.LabelAdapter, sa // If provided, we expect a matched entry for exemplars (like labels and samples) but the // entry may be nil since not every timeseries is guaranteed to have an exemplar. if e := exemplars[i]; e != nil { - ts.Exemplars = append(ts.Exemplars, *e) + ts.Exemplars = append(ts.Exemplars, e) } } @@ -68,7 +68,7 @@ func (req *WriteRequest) AddFloatSeries(lbls [][]mimirpb_custom.LabelAdapter, sa // AddHistogramSeries converts matched slices of Labels, Histograms, Exemplars into a WriteRequest // proto. It gets timeseries from the pool, so ReuseSlice() should be called when done. Note that this // method implies that only a single sample and optionally exemplar can be set for each series. -func (req *WriteRequest) AddHistogramSeries(lbls [][]mimirpb_custom.LabelAdapter, histograms []Histogram, exemplars []*Exemplar) *WriteRequest { +func (req *WriteRequest) AddHistogramSeries(lbls [][]*mimirpb_custom.LabelAdapter, histograms []*Histogram, exemplars []*Exemplar) *WriteRequest { for i, s := range histograms { ts := TimeseriesFromPool() ts.Labels = append(ts.Labels, lbls[i]...) @@ -78,7 +78,7 @@ func (req *WriteRequest) AddHistogramSeries(lbls [][]mimirpb_custom.LabelAdapter // If provided, we expect a matched entry for exemplars (like labels and samples) but the // entry may be nil since not every timeseries is guaranteed to have an exemplar. if e := exemplars[i]; e != nil { - ts.Exemplars = append(ts.Exemplars, *e) + ts.Exemplars = append(ts.Exemplars, e) } } @@ -93,7 +93,7 @@ func (req *WriteRequest) AddHistogramSeries(lbls [][]mimirpb_custom.LabelAdapter // to be added per time series for simplicity. func (req *WriteRequest) AddExemplarsAt(i int, exemplars []*Exemplar) *WriteRequest { for _, e := range exemplars { - req.Timeseries[i].Exemplars = append(req.Timeseries[i].Exemplars, *e) + req.Timeseries[i].Exemplars = append(req.Timeseries[i].Exemplars, e) } return req } @@ -598,7 +598,7 @@ type PreallocatingMetric struct { func (m *PreallocatingMetric) Unmarshal(dAtA []byte) error { numLabels, ok := m.labelsCount(dAtA) if ok && numLabels > 0 { - m.Labels = make([]mimirpb_custom.LabelAdapter, 0, numLabels) + m.Labels = make([]*mimirpb_custom.LabelAdapter, 0, numLabels) } return m.Metric.Unmarshal(dAtA) diff --git a/pkg/mimirpb/compat_slice.go b/pkg/mimirpb/compat_slice.go index 2e815cc447a..0746ac167a5 100644 --- a/pkg/mimirpb/compat_slice.go +++ b/pkg/mimirpb/compat_slice.go @@ -21,19 +21,23 @@ import ( // // Note: while resulting labels.Labels is supposedly sorted, this function // doesn't enforce that. If input is not sorted, output will be wrong. -func FromLabelAdaptersToLabels(ls []mimirpb_custom.LabelAdapter) labels.Labels { - return *(*labels.Labels)(unsafe.Pointer(&ls)) +func FromLabelAdaptersToLabels(ls []*mimirpb_custom.LabelAdapter) labels.Labels { + out := make(labels.Labels, len(ls)) + for i := range ls { + out[i] = *(*labels.Label)(unsafe.Pointer(ls[i])) // Dereferencing and converting safely + } + return out } // This is like FromLabelAdaptersToLabels but easier for stringlabels to implement. -func FromLabelAdaptersOverwriteLabels(_ *labels.ScratchBuilder, ls []mimirpb_custom.LabelAdapter, dest *labels.Labels) { +func FromLabelAdaptersOverwriteLabels(_ *labels.ScratchBuilder, ls []*mimirpb_custom.LabelAdapter, dest *labels.Labels) { *dest = FromLabelAdaptersToLabels(ls) } // FromLabelAdaptersToLabelsWithCopy converts []LabelAdapter to labels.Labels. // Do NOT use unsafe to convert between data types because this function may // get in input labels whose data structure is reused. -func FromLabelAdaptersToLabelsWithCopy(input []mimirpb_custom.LabelAdapter) labels.Labels { +func FromLabelAdaptersToLabelsWithCopy(input []*mimirpb_custom.LabelAdapter) labels.Labels { return CopyLabels(FromLabelAdaptersToLabels(input)) } @@ -72,23 +76,27 @@ func copyStringToBuffer(in string, buf []byte) (string, []byte) { } // FromLabelAdaptersToBuilder converts []LabelAdapter to labels.Builder. -func FromLabelAdaptersToBuilder(ls []mimirpb_custom.LabelAdapter, builder *labels.Builder) { +func FromLabelAdaptersToBuilder(ls []*mimirpb_custom.LabelAdapter, builder *labels.Builder) { builder.Reset(FromLabelAdaptersToLabels(ls)) } // FromBuilderToLabelAdapters converts labels.Builder to []LabelAdapter. -func FromBuilderToLabelAdapters(builder *labels.Builder, _ []mimirpb_custom.LabelAdapter) []mimirpb_custom.LabelAdapter { +func FromBuilderToLabelAdapters(builder *labels.Builder, _ []*mimirpb_custom.LabelAdapter) []*mimirpb_custom.LabelAdapter { return FromLabelsToLabelAdapters(builder.Labels()) } -// FromLabelsToLabelAdapters casts labels.Labels to []LabelAdapter. -// It uses unsafe, but as LabelAdapter == labels.Label this should be safe. -// This allows us to use labels.Labels directly in protos. -func FromLabelsToLabelAdapters(ls labels.Labels) []mimirpb_custom.LabelAdapter { - return *(*[]mimirpb_custom.LabelAdapter)(unsafe.Pointer(&ls)) +// FromLabelsToLabelAdapters converts labels.Labels to []*LabelAdapter. +// This avoids unsafe operations and ensures correctness. +func FromLabelsToLabelAdapters(ls labels.Labels) []*mimirpb_custom.LabelAdapter { + adapters := make([]*mimirpb_custom.LabelAdapter, len(ls)) + for i := range ls { + // Cast each Label to LabelAdapter and take the address + adapters[i] = (*mimirpb_custom.LabelAdapter)(unsafe.Pointer(&ls[i])) + } + return adapters } // CompareLabelAdapters returns 0 if a==b, <0 if a < b, and >0 if a > b. -func CompareLabelAdapters(a, b []mimirpb_custom.LabelAdapter) int { +func CompareLabelAdapters(a, b []*mimirpb_custom.LabelAdapter) int { return labels.Compare(FromLabelAdaptersToLabels(a), FromLabelAdaptersToLabels(b)) } diff --git a/pkg/mimirpb/compat_test.go b/pkg/mimirpb/compat_test.go index f1c1fd8d91f..a626416b872 100644 --- a/pkg/mimirpb/compat_test.go +++ b/pkg/mimirpb/compat_test.go @@ -180,7 +180,7 @@ func TestMetricMetadataToMetricTypeToMetricType(t *testing.T) { } func TestFromLabelAdaptersToLabels(t *testing.T) { - input := []mimirpb_custom.LabelAdapter{{Name: "hello", Value: "world"}} + input := []*mimirpb_custom.LabelAdapter{{Name: "hello", Value: "world"}} expected := labels.FromStrings("hello", "world") actual := FromLabelAdaptersToLabels(input) @@ -188,7 +188,7 @@ func TestFromLabelAdaptersToLabels(t *testing.T) { } func TestFromLabelAdaptersToLabelsWithCopy(t *testing.T) { - input := []mimirpb_custom.LabelAdapter{{Name: "hello", Value: "world"}} + input := []*mimirpb_custom.LabelAdapter{{Name: "hello", Value: "world"}} expected := labels.FromStrings("hello", "world") actual := FromLabelAdaptersToLabelsWithCopy(input) @@ -200,7 +200,7 @@ func TestFromLabelAdaptersToLabelsWithCopy(t *testing.T) { } func BenchmarkFromLabelAdaptersToLabelsWithCopy(b *testing.B) { - input := []mimirpb_custom.LabelAdapter{ + input := []*mimirpb_custom.LabelAdapter{ {Name: "hello", Value: "world"}, {Name: "some label", Value: "and its value"}, {Name: "long long long long long label name", Value: "perhaps even longer label value, but who's counting anyway?"}} @@ -266,7 +266,7 @@ func BenchmarkFromHPointsToHistograms(b *testing.B) { func TestPreallocatingMetric(t *testing.T) { t.Run("should be unmarshallable from the bytes of a default Metric", func(t *testing.T) { metric := Metric{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "l1", Value: "v1"}, {Name: "l2", Value: "v2"}, {Name: "l3", Value: "v3"}, @@ -290,7 +290,7 @@ func TestPreallocatingMetric(t *testing.T) { t.Run("should correctly preallocate Labels slice", func(t *testing.T) { metric := Metric{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "l1", Value: "v1"}, {Name: "l2", Value: "v2"}, {Name: "l3", Value: "v3"}, @@ -311,7 +311,7 @@ func TestPreallocatingMetric(t *testing.T) { t.Run("should not allocate a slice when there are 0 Labels (same as Metric's behaviour)", func(t *testing.T) { metric := Metric{ - Labels: []mimirpb_custom.LabelAdapter{}, + Labels: []*mimirpb_custom.LabelAdapter{}, } metricBytes, err := metric.Marshal() @@ -325,7 +325,7 @@ func TestPreallocatingMetric(t *testing.T) { t.Run("should marshal to the same bytes as Metric", func(t *testing.T) { preallocMetric := &PreallocatingMetric{Metric{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "l1", Value: "v1"}, {Name: "l2", Value: "v2"}, {Name: "l3", Value: "v3"}, @@ -335,7 +335,7 @@ func TestPreallocatingMetric(t *testing.T) { }} metric := Metric{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "l1", Value: "v1"}, {Name: "l2", Value: "v2"}, {Name: "l3", Value: "v3"}, @@ -643,65 +643,65 @@ func TestPrometheusHistogramSpanInSyncWithMimirPbBucketSpan(_ *testing.T) { } func TestCompareLabelAdapters(t *testing.T) { - labels := []mimirpb_custom.LabelAdapter{ + labels := []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bbb", Value: "222"}, } tests := []struct { - compared []mimirpb_custom.LabelAdapter + compared []*mimirpb_custom.LabelAdapter expected int }{ { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "110"}, {Name: "bbb", Value: "222"}, }, expected: 1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bbb", Value: "233"}, }, expected: -1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bar", Value: "222"}, }, expected: 1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bbc", Value: "222"}, }, expected: -1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bb", Value: "222"}, }, expected: 1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bbbb", Value: "222"}, }, expected: -1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, }, expected: 1, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bbb", Value: "222"}, {Name: "ccc", Value: "333"}, @@ -710,14 +710,14 @@ func TestCompareLabelAdapters(t *testing.T) { expected: -2, }, { - compared: []mimirpb_custom.LabelAdapter{ + compared: []*mimirpb_custom.LabelAdapter{ {Name: "aaa", Value: "111"}, {Name: "bbb", Value: "222"}, }, expected: 0, }, { - compared: []mimirpb_custom.LabelAdapter{}, + compared: []*mimirpb_custom.LabelAdapter{}, expected: 1, }, } diff --git a/pkg/mimirpb/custom_test.go b/pkg/mimirpb/custom_test.go index 491b8358fdf..7273267a26a 100644 --- a/pkg/mimirpb/custom_test.go +++ b/pkg/mimirpb/custom_test.go @@ -16,27 +16,27 @@ import ( func TestWriteRequest_MinTimestamp(t *testing.T) { req := &WriteRequest{ Timeseries: []PreallocTimeseries{{TimeSeries: &TimeSeries{ - Samples: []Sample{{TimestampMs: 10}}, - Exemplars: []Exemplar{{TimestampMs: 20}}, - Histograms: []Histogram{{Timestamp: 30}}, + Samples: []*Sample{{TimestampMs: 10}}, + Exemplars: []*Exemplar{{TimestampMs: 20}}, + Histograms: []*Histogram{{Timestamp: 30}}, }}}, } assert.Equal(t, int64(10), req.MinTimestamp()) req = &WriteRequest{ Timeseries: []PreallocTimeseries{{TimeSeries: &TimeSeries{ - Samples: []Sample{{TimestampMs: 20}}, - Exemplars: []Exemplar{{TimestampMs: 10}}, - Histograms: []Histogram{{Timestamp: 30}}, + Samples: []*Sample{{TimestampMs: 20}}, + Exemplars: []*Exemplar{{TimestampMs: 10}}, + Histograms: []*Histogram{{Timestamp: 30}}, }}}, } assert.Equal(t, int64(10), req.MinTimestamp()) req = &WriteRequest{ Timeseries: []PreallocTimeseries{{TimeSeries: &TimeSeries{ - Samples: []Sample{{TimestampMs: 20}}, - Exemplars: []Exemplar{{TimestampMs: 30}}, - Histograms: []Histogram{{Timestamp: 10}}, + Samples: []*Sample{{TimestampMs: 20}}, + Exemplars: []*Exemplar{{TimestampMs: 30}}, + Histograms: []*Histogram{{Timestamp: 10}}, }}}, } assert.Equal(t, int64(10), req.MinTimestamp()) @@ -46,7 +46,7 @@ func TestWriteRequest_IsEmpty(t *testing.T) { t.Run("should return false if a WriteRequest has both Timeseries and Metadata", func(t *testing.T) { req := &WriteRequest{ Timeseries: []PreallocTimeseries{{TimeSeries: &TimeSeries{ - Samples: []Sample{{TimestampMs: 20}}, + Samples: []*Sample{{TimestampMs: 20}}, }}}, Metadata: []*MetricMetadata{ {Type: COUNTER, MetricFamilyName: "test_metric", Help: "This is a test metric."}, @@ -59,7 +59,7 @@ func TestWriteRequest_IsEmpty(t *testing.T) { t.Run("should return false if a WriteRequest has only Timeseries", func(t *testing.T) { req := &WriteRequest{ Timeseries: []PreallocTimeseries{{TimeSeries: &TimeSeries{ - Samples: []Sample{{TimestampMs: 20}}, + Samples: []*Sample{{TimestampMs: 20}}, }}}, } @@ -89,9 +89,9 @@ func TestWriteRequest_IsEmpty(t *testing.T) { func TestWriteRequest_MetadataSize_TimeseriesSize(t *testing.T) { req := &WriteRequest{ Timeseries: []PreallocTimeseries{{TimeSeries: &TimeSeries{ - Samples: []Sample{{TimestampMs: 20}}, - Exemplars: []Exemplar{{TimestampMs: 30}}, - Histograms: []Histogram{{Timestamp: 10}}, + Samples: []*Sample{{TimestampMs: 20}}, + Exemplars: []*Exemplar{{TimestampMs: 30}}, + Histograms: []*Histogram{{Timestamp: 10}}, }}}, Metadata: []*MetricMetadata{ {Type: COUNTER, MetricFamilyName: "test_metric", Help: "This is a test metric."}, diff --git a/pkg/mimirpb/mimir.pb.go b/pkg/mimirpb/mimir.pb.go index c2385621b17..41eb62857cc 100644 --- a/pkg/mimirpb/mimir.pb.go +++ b/pkg/mimirpb/mimir.pb.go @@ -387,11 +387,11 @@ func (m *ErrorDetails) GetCause() ErrorCause { } type TimeSeries struct { - Labels []mimirpb_custom.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` + Labels []*mimirpb_custom.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` // Sorted by time, oldest sample first. - Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"` - Exemplars []Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars"` - Histograms []Histogram `protobuf:"bytes,4,rep,name=histograms,proto3" json:"histograms"` + Samples []*Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples,omitempty"` + Exemplars []*Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars,omitempty"` + Histograms []*Histogram `protobuf:"bytes,4,rep,name=histograms,proto3" json:"histograms,omitempty"` // Skip unmarshaling of exemplars. SkipUnmarshalingExemplars bool @@ -429,28 +429,28 @@ func (m *TimeSeries) XXX_DiscardUnknown() { var xxx_messageInfo_TimeSeries proto.InternalMessageInfo -func (m *TimeSeries) GetLabels() []mimirpb_custom.LabelAdapter { +func (m *TimeSeries) GetLabels() []*mimirpb_custom.LabelAdapter { if m != nil { return m.Labels } return nil } -func (m *TimeSeries) GetSamples() []Sample { +func (m *TimeSeries) GetSamples() []*Sample { if m != nil { return m.Samples } return nil } -func (m *TimeSeries) GetExemplars() []Exemplar { +func (m *TimeSeries) GetExemplars() []*Exemplar { if m != nil { return m.Exemplars } return nil } -func (m *TimeSeries) GetHistograms() []Histogram { +func (m *TimeSeries) GetHistograms() []*Histogram { if m != nil { return m.Histograms } @@ -577,7 +577,7 @@ func (m *MetricMetadata) GetUnit() string { } type Metric struct { - Labels []mimirpb_custom.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` + Labels []*mimirpb_custom.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` } func (m *Metric) Reset() { *m = Metric{} } @@ -612,7 +612,7 @@ func (m *Metric) XXX_DiscardUnknown() { var xxx_messageInfo_Metric proto.InternalMessageInfo -func (m *Metric) GetLabels() []mimirpb_custom.LabelAdapter { +func (m *Metric) GetLabels() []*mimirpb_custom.LabelAdapter { if m != nil { return m.Labels } @@ -621,9 +621,9 @@ func (m *Metric) GetLabels() []mimirpb_custom.LabelAdapter { type Exemplar struct { // Exemplar labels, different than series labels - Labels []mimirpb_custom.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"` - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` - TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` + Labels []*mimirpb_custom.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` + Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` + TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` } func (m *Exemplar) Reset() { *m = Exemplar{} } @@ -658,7 +658,7 @@ func (m *Exemplar) XXX_DiscardUnknown() { var xxx_messageInfo_Exemplar proto.InternalMessageInfo -func (m *Exemplar) GetLabels() []mimirpb_custom.LabelAdapter { +func (m *Exemplar) GetLabels() []*mimirpb_custom.LabelAdapter { if m != nil { return m.Labels } @@ -1894,135 +1894,135 @@ func init() { func init() { proto.RegisterFile("mimir.proto", fileDescriptor_86d4d7485f544059) } var fileDescriptor_86d4d7485f544059 = []byte{ - // 2033 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x93, 0xdb, 0x48, - 0x15, 0xb7, 0x6c, 0x8d, 0x6d, 0xbd, 0xb1, 0x67, 0x3a, 0x9d, 0x6c, 0xf0, 0x0e, 0x1b, 0x27, 0xab, - 0x2d, 0x96, 0x21, 0x05, 0x13, 0x6a, 0x43, 0x65, 0x6b, 0x43, 0xf8, 0x90, 0x6d, 0x25, 0xe3, 0xac, - 0x2d, 0xcf, 0xb6, 0xe4, 0x84, 0x70, 0x51, 0x69, 0x3c, 0x3d, 0x33, 0xaa, 0x58, 0x92, 0x91, 0xe4, - 0x6c, 0xc2, 0x69, 0x2f, 0x54, 0x51, 0x9c, 0xb8, 0x70, 0xa1, 0xb8, 0x71, 0xa1, 0x8a, 0x7f, 0x24, - 0x55, 0x5c, 0x72, 0x5c, 0x38, 0xa4, 0xc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0x48, 0x61, 0x5b, 0xf5, 0x87, 0xa4, 0x3f, 0x1d, 0x5a, 0x76, 0x8f, 0xe8, 0xda, 0xc7, - 0x3a, 0xb1, 0x27, 0x7b, 0xba, 0x81, 0x00, 0x5f, 0x04, 0x3c, 0xd6, 0xad, 0xdd, 0x89, 0x78, 0x37, - 0x6d, 0x34, 0x9a, 0xdc, 0xd7, 0x07, 0x68, 0x1d, 0x23, 0x68, 0x59, 0xba, 0xa1, 0x19, 0x56, 0x42, - 0xa0, 0xd5, 0xfb, 0xc1, 0xb3, 0x17, 0xdd, 0xca, 0xe7, 0x2f, 0xba, 0x95, 0x2f, 0x5f, 0x74, 0xa5, - 0xcf, 0x4e, 0xba, 0xd2, 0x1f, 0x4e, 0xba, 0xd2, 0xd3, 0x93, 0xae, 0xf4, 0xec, 0xa4, 0x2b, 0xfd, - 0xf5, 0xa4, 0x2b, 0x7d, 0x71, 0xd2, 0xad, 0x7c, 0x79, 0xd2, 0x95, 0x7e, 0xfd, 0xb2, 0x5b, 0x79, - 0xf6, 0xb2, 0x5b, 0xf9, 0xfc, 0x65, 0xb7, 0xf2, 0xd3, 0x46, 0xf2, 0xcb, 0x6b, 0xbf, 0xce, 0xff, - 0x6c, 0x5d, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0x95, 0x60, 0x64, 0x67, 0x13, 0x00, - 0x00, + // 2038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x8f, 0xdb, 0xc6, + 0x15, 0x17, 0x25, 0xae, 0x24, 0xbe, 0x95, 0x76, 0xc7, 0x63, 0xc7, 0x55, 0xb6, 0xb1, 0x6c, 0x33, + 0x68, 0xba, 0x35, 0xda, 0x75, 0x10, 0xb7, 0x09, 0x6a, 0xb8, 0x4d, 0x29, 0x89, 0xf6, 0xca, 0x91, + 0xa8, 0xcd, 0x90, 0xb2, 0xeb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7, + 0x60, 0xad, 0xef, 0x2c, 0x23, 0xda, 0x91, 0xf8, 0x61, 0x15, 0x8e, 0x9e, 0xc3, 0xb8, 0x8d, 0x08, + 0x88, 0xfa, 0x37, 0x09, 0x20, 0x0f, 0x08, 0xfe, 0x11, 0xd4, 0x39, 0xef, 0x34, 0x6c, 0x97, 0x32, + 0xdf, 0x24, 0xf2, 0x3b, 0x9c, 0xb3, 0x76, 0xe0, 0x2c, 0x62, 0x1a, 0x92, 0x04, 0x8c, 0xaf, 0x41, + 0x23, 0x72, 0xbc, 0xc5, 0x9c, 0x46, 0x9d, 0x2a, 0xf7, 0x43, 0xf9, 0x9e, 0x26, 0x37, 0x90, 0x14, + 0x80, 0xdf, 0x07, 0x85, 0x3e, 0xa6, 0xde, 0x62, 0xee, 0x84, 0x51, 0x12, 0x11, 0x5c, 0x60, 0x98, + 0x98, 0x48, 0x0e, 0xc2, 0x37, 0x00, 0x8e, 0xdd, 0x28, 0x0e, 0x8e, 0x42, 0xc7, 0x8b, 0x3a, 0x32, + 0x77, 0x39, 0x9f, 0xbb, 0xec, 0xa6, 0x36, 0x52, 0x80, 0xa9, 0x1a, 0xd4, 0xc5, 0xce, 0xf8, 0x2a, + 0xb4, 0x78, 0x2a, 0xc5, 0x8e, 0xb7, 0xb0, 0xbd, 0x88, 0xa7, 0x50, 0x8d, 0xac, 0x67, 0xba, 0x71, + 0x84, 0x2f, 0xc0, 0xda, 0x23, 0x67, 0xbe, 0x14, 0x27, 0x26, 0x11, 0x21, 0xa8, 0x7f, 0xa8, 0xc2, + 0x46, 0x39, 0x43, 0xf0, 0x47, 0x20, 0xb3, 0xd4, 0x4f, 0x4e, 0xf6, 0xdd, 0xb3, 0x32, 0x29, 0x11, + 0xad, 0x27, 0x0b, 0x4a, 0xb8, 0x03, 0xfe, 0x3e, 0x60, 0x8f, 0xeb, 0xec, 0x43, 0xc7, 0x73, 0xe7, + 0x4f, 0x6c, 0xdf, 0xf1, 0x44, 0x36, 0x2b, 0x04,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d5, 0x2f, 0xb4, 0xa8, 0x8e, 0xbf, 0x05, 0xe7, 0x4d, 0x9d, + 0xdc, 0x1b, 0xf6, 0x75, 0xbb, 0x58, 0xdd, 0x0d, 0x7c, 0x01, 0x90, 0x65, 0x0e, 0x7a, 0x25, 0x6d, + 0x93, 0xd1, 0x60, 0xec, 0x7a, 0x53, 0xf3, 0x01, 0x52, 0xd8, 0x56, 0xfd, 0x21, 0xe9, 0x4f, 0x87, + 0x96, 0xdd, 0x23, 0xba, 0xf6, 0x89, 0x4e, 0xec, 0xc9, 0x9e, 0x6e, 0x20, 0xc0, 0x17, 0x01, 0x8f, + 0x75, 0x6b, 0x77, 0x22, 0xde, 0x4d, 0x1b, 0x8d, 0x26, 0xf7, 0xf5, 0x01, 0x5a, 0xc7, 0x08, 0x5a, + 0x96, 0x6e, 0x68, 0x86, 0x95, 0x10, 0x68, 0xf5, 0x7e, 0xf2, 0xec, 0x45, 0xb7, 0xf2, 0xc5, 0x8b, + 0x6e, 0xe5, 0xab, 0x17, 0x5d, 0xe9, 0x57, 0x27, 0x5d, 0xe9, 0xcf, 0x27, 0x5d, 0xe9, 0xe9, 0x49, + 0x57, 0x7a, 0x76, 0xd2, 0x95, 0xfe, 0x79, 0xd2, 0x95, 0xbe, 0x3c, 0xe9, 0x56, 0xbe, 0x3a, 0xe9, + 0x4a, 0xbf, 0x7b, 0xd9, 0xad, 0x3c, 0x7b, 0xd9, 0xad, 0x7c, 0xf1, 0xb2, 0x5b, 0xf9, 0x45, 0x23, + 0xf9, 0x9b, 0xb5, 0x5f, 0xe7, 0x3f, 0xad, 0x6e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x15, 0xa1, + 0xd5, 0x77, 0x42, 0x13, 0x00, 0x00, } func (x ErrorCause) String() string { @@ -2181,7 +2181,7 @@ func (this *TimeSeries) Equal(that interface{}) bool { return false } for i := range this.Labels { - if !this.Labels[i].Equal(&that1.Labels[i]) { + if !this.Labels[i].Equal(that1.Labels[i]) { return false } } @@ -2189,7 +2189,7 @@ func (this *TimeSeries) Equal(that interface{}) bool { return false } for i := range this.Samples { - if !this.Samples[i].Equal(&that1.Samples[i]) { + if !this.Samples[i].Equal(that1.Samples[i]) { return false } } @@ -2197,7 +2197,7 @@ func (this *TimeSeries) Equal(that interface{}) bool { return false } for i := range this.Exemplars { - if !this.Exemplars[i].Equal(&that1.Exemplars[i]) { + if !this.Exemplars[i].Equal(that1.Exemplars[i]) { return false } } @@ -2205,7 +2205,7 @@ func (this *TimeSeries) Equal(that interface{}) bool { return false } for i := range this.Histograms { - if !this.Histograms[i].Equal(&that1.Histograms[i]) { + if !this.Histograms[i].Equal(that1.Histograms[i]) { return false } } @@ -2294,7 +2294,7 @@ func (this *Metric) Equal(that interface{}) bool { return false } for i := range this.Labels { - if !this.Labels[i].Equal(&that1.Labels[i]) { + if !this.Labels[i].Equal(that1.Labels[i]) { return false } } @@ -2323,7 +2323,7 @@ func (this *Exemplar) Equal(that interface{}) bool { return false } for i := range this.Labels { - if !this.Labels[i].Equal(&that1.Labels[i]) { + if !this.Labels[i].Equal(that1.Labels[i]) { return false } } @@ -3189,32 +3189,16 @@ func (this *TimeSeries) GoString() string { s := make([]string, 0, 8) s = append(s, "&mimirpb.TimeSeries{") if this.Labels != nil { - vs := make([]*mimirpb_custom.LabelAdapter, len(this.Labels)) - for i := range vs { - vs[i] = &this.Labels[i] - } - s = append(s, "Labels: "+fmt.Sprintf("%#v", vs)+",\n") + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } if this.Samples != nil { - vs := make([]*Sample, len(this.Samples)) - for i := range vs { - vs[i] = &this.Samples[i] - } - s = append(s, "Samples: "+fmt.Sprintf("%#v", vs)+",\n") + s = append(s, "Samples: "+fmt.Sprintf("%#v", this.Samples)+",\n") } if this.Exemplars != nil { - vs := make([]*Exemplar, len(this.Exemplars)) - for i := range vs { - vs[i] = &this.Exemplars[i] - } - s = append(s, "Exemplars: "+fmt.Sprintf("%#v", vs)+",\n") + s = append(s, "Exemplars: "+fmt.Sprintf("%#v", this.Exemplars)+",\n") } if this.Histograms != nil { - vs := make([]*Histogram, len(this.Histograms)) - for i := range vs { - vs[i] = &this.Histograms[i] - } - s = append(s, "Histograms: "+fmt.Sprintf("%#v", vs)+",\n") + s = append(s, "Histograms: "+fmt.Sprintf("%#v", this.Histograms)+",\n") } s = append(s, "}") return strings.Join(s, "") @@ -3250,11 +3234,7 @@ func (this *Metric) GoString() string { s := make([]string, 0, 5) s = append(s, "&mimirpb.Metric{") if this.Labels != nil { - vs := make([]*mimirpb_custom.LabelAdapter, len(this.Labels)) - for i := range vs { - vs[i] = &this.Labels[i] - } - s = append(s, "Labels: "+fmt.Sprintf("%#v", vs)+",\n") + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } s = append(s, "}") return strings.Join(s, "") @@ -3266,11 +3246,7 @@ func (this *Exemplar) GoString() string { s := make([]string, 0, 7) s = append(s, "&mimirpb.Exemplar{") if this.Labels != nil { - vs := make([]*mimirpb_custom.LabelAdapter, len(this.Labels)) - for i := range vs { - vs[i] = &this.Labels[i] - } - s = append(s, "Labels: "+fmt.Sprintf("%#v", vs)+",\n") + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") } s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") s = append(s, "TimestampMs: "+fmt.Sprintf("%#v", this.TimestampMs)+",\n") @@ -5636,24 +5612,24 @@ func (this *TimeSeries) String() string { if this == nil { return "nil" } - repeatedStringForLabels := "[]LabelAdapter{" + repeatedStringForLabels := "[]*LabelAdapter{" for _, f := range this.Labels { - repeatedStringForLabels += fmt.Sprintf("%v", f) + "," + repeatedStringForLabels += strings.Replace(fmt.Sprintf("%v", f), "LabelAdapter", "mimirpb_custom.LabelAdapter", 1) + "," } repeatedStringForLabels += "}" - repeatedStringForSamples := "[]Sample{" + repeatedStringForSamples := "[]*Sample{" for _, f := range this.Samples { - repeatedStringForSamples += strings.Replace(strings.Replace(f.String(), "Sample", "Sample", 1), `&`, ``, 1) + "," + repeatedStringForSamples += strings.Replace(f.String(), "Sample", "Sample", 1) + "," } repeatedStringForSamples += "}" - repeatedStringForExemplars := "[]Exemplar{" + repeatedStringForExemplars := "[]*Exemplar{" for _, f := range this.Exemplars { - repeatedStringForExemplars += strings.Replace(strings.Replace(f.String(), "Exemplar", "Exemplar", 1), `&`, ``, 1) + "," + repeatedStringForExemplars += strings.Replace(f.String(), "Exemplar", "Exemplar", 1) + "," } repeatedStringForExemplars += "}" - repeatedStringForHistograms := "[]Histogram{" + repeatedStringForHistograms := "[]*Histogram{" for _, f := range this.Histograms { - repeatedStringForHistograms += strings.Replace(strings.Replace(f.String(), "Histogram", "Histogram", 1), `&`, ``, 1) + "," + repeatedStringForHistograms += strings.Replace(f.String(), "Histogram", "Histogram", 1) + "," } repeatedStringForHistograms += "}" s := strings.Join([]string{`&TimeSeries{`, @@ -5693,9 +5669,9 @@ func (this *Metric) String() string { if this == nil { return "nil" } - repeatedStringForLabels := "[]LabelAdapter{" + repeatedStringForLabels := "[]*LabelAdapter{" for _, f := range this.Labels { - repeatedStringForLabels += fmt.Sprintf("%v", f) + "," + repeatedStringForLabels += strings.Replace(fmt.Sprintf("%v", f), "LabelAdapter", "mimirpb_custom.LabelAdapter", 1) + "," } repeatedStringForLabels += "}" s := strings.Join([]string{`&Metric{`, @@ -5708,9 +5684,9 @@ func (this *Exemplar) String() string { if this == nil { return "nil" } - repeatedStringForLabels := "[]LabelAdapter{" + repeatedStringForLabels := "[]*LabelAdapter{" for _, f := range this.Labels { - repeatedStringForLabels += fmt.Sprintf("%v", f) + "," + repeatedStringForLabels += strings.Replace(fmt.Sprintf("%v", f), "LabelAdapter", "mimirpb_custom.LabelAdapter", 1) + "," } repeatedStringForLabels += "}" s := strings.Join([]string{`&Exemplar{`, @@ -6112,7 +6088,6 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } m.Timeseries = append(m.Timeseries, PreallocTimeseries{}) - m.Timeseries[len(m.Timeseries)-1].skipUnmarshalingExemplars = m.skipUnmarshalingExemplars if err := m.Timeseries[len(m.Timeseries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6417,7 +6392,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, mimirpb_custom.LabelAdapter{}) + m.Labels = append(m.Labels, &mimirpb_custom.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6451,7 +6426,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Samples = append(m.Samples, Sample{}) + m.Samples = append(m.Samples, &Sample{}) if err := m.Samples[len(m.Samples)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6485,11 +6460,9 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if !m.SkipUnmarshalingExemplars { - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Exemplars = append(m.Exemplars, &Exemplar{}) + if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 4: @@ -6521,7 +6494,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Histograms = append(m.Histograms, Histogram{}) + m.Histograms = append(m.Histograms, &Histogram{}) if err := m.Histograms[len(m.Histograms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6859,7 +6832,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, mimirpb_custom.LabelAdapter{}) + m.Labels = append(m.Labels, &mimirpb_custom.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6946,7 +6919,7 @@ func (m *Exemplar) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, mimirpb_custom.LabelAdapter{}) + m.Labels = append(m.Labels, &mimirpb_custom.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/mimirpb/mimir.pb.go.expdiff b/pkg/mimirpb/mimir.pb.go.expdiff index 0ac49f36b50..22b589814f2 100644 --- a/pkg/mimirpb/mimir.pb.go.expdiff +++ b/pkg/mimirpb/mimir.pb.go.expdiff @@ -13,9 +13,9 @@ index 2fcc5ccde1..0688358568 100644 func (m *WriteRequest) Reset() { *m = WriteRequest{} } @@ -392,9 +389,6 @@ type TimeSeries struct { - Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"` - Exemplars []Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars"` - Histograms []Histogram `protobuf:"bytes,4,rep,name=histograms,proto3" json:"histograms"` + Samples []*Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples,omitempty"` + Exemplars []*Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars,omitempty"` + Histograms []*Histogram `protobuf:"bytes,4,rep,name=histograms,proto3" json:"histograms,omitempty"` - - // Skip unmarshaling of exemplars. - SkipUnmarshalingExemplars bool diff --git a/pkg/mimirpb/mimir.proto b/pkg/mimirpb/mimir.proto index 3e2e058928b..952a3d969ea 100644 --- a/pkg/mimirpb/mimir.proto +++ b/pkg/mimirpb/mimir.proto @@ -59,11 +59,11 @@ message ErrorDetails { } message TimeSeries { - repeated cortexpb_custom.LabelAdapter labels = 1 [(gogoproto.nullable) = false]; + repeated cortexpb_custom.LabelAdapter labels = 1; // Sorted by time, oldest sample first. - repeated Sample samples = 2 [(gogoproto.nullable) = false]; - repeated Exemplar exemplars = 3 [(gogoproto.nullable) = false]; - repeated Histogram histograms = 4 [(gogoproto.nullable) = false]; + repeated Sample samples = 2; + repeated Exemplar exemplars = 3; + repeated Histogram histograms = 4; } //message LabelPair { @@ -96,12 +96,12 @@ message MetricMetadata { } message Metric { - repeated cortexpb_custom.LabelAdapter labels = 1 [(gogoproto.nullable) = false]; + repeated cortexpb_custom.LabelAdapter labels = 1; } message Exemplar { // Exemplar labels, different than series labels - repeated cortexpb_custom.LabelAdapter labels = 1 [(gogoproto.nullable) = false]; + repeated cortexpb_custom.LabelAdapter labels = 1; double value = 2; int64 timestamp_ms = 3; } diff --git a/pkg/mimirpb/split_test.go b/pkg/mimirpb/split_test.go index 5ddf7d0bd14..0974a537e30 100644 --- a/pkg/mimirpb/split_test.go +++ b/pkg/mimirpb/split_test.go @@ -21,13 +21,13 @@ func TestSplitWriteRequestByMaxMarshalSize(t *testing.T) { Timeseries: []PreallocTimeseries{ {TimeSeries: &TimeSeries{ Labels: FromLabelsToLabelAdapters(labels.FromStrings(labels.MetricName, "series_1", "pod", "test-application-123456")), - Samples: []Sample{{TimestampMs: 20}}, - Exemplars: []Exemplar{{TimestampMs: 30}}, - Histograms: []Histogram{{Timestamp: 10}}, + Samples: []*Sample{{TimestampMs: 20}}, + Exemplars: []*Exemplar{{TimestampMs: 30}}, + Histograms: []*Histogram{{Timestamp: 10}}, }}, {TimeSeries: &TimeSeries{ Labels: FromLabelsToLabelAdapters(labels.FromStrings(labels.MetricName, "series_2", "pod", "test-application-123456")), - Samples: []Sample{{TimestampMs: 30}}, + Samples: []*Sample{{TimestampMs: 30}}, }}, }, Metadata: []*MetricMetadata{ @@ -298,9 +298,9 @@ func generateWriteRequest(numSeries, numLabelsPerSeries, numSamplesPerSeries, nu curr.Labels = FromLabelsToLabelAdapters(builder.Labels()) // Generate samples. - curr.Samples = make([]Sample, 0, numSamplesPerSeries) + curr.Samples = make([]*Sample, 0, numSamplesPerSeries) for s := 0; s < numSamplesPerSeries; s++ { - curr.Samples = append(curr.Samples, Sample{ + curr.Samples = append(curr.Samples, &Sample{ TimestampMs: int64(s), Value: float64(s), }) @@ -309,7 +309,7 @@ func generateWriteRequest(numSeries, numLabelsPerSeries, numSamplesPerSeries, nu // Add an exemplar. builder.Reset() builder.Add("trace_id", fmt.Sprintf("the-trace-id-for-%d", i)) - curr.Exemplars = []Exemplar{{ + curr.Exemplars = []*Exemplar{{ Labels: FromLabelsToLabelAdapters(builder.Labels()), TimestampMs: int64(i), Value: float64(i), diff --git a/pkg/mimirpb/timeseries.go b/pkg/mimirpb/timeseries.go index 7415c9c85fa..f752c0644ad 100644 --- a/pkg/mimirpb/timeseries.go +++ b/pkg/mimirpb/timeseries.go @@ -35,9 +35,9 @@ var ( timeSeriesPool = sync.Pool{ New: func() interface{} { return &TimeSeries{ - Labels: make([]mimirpb_custom.LabelAdapter, 0, minPreallocatedLabels), - Samples: make([]Sample, 0, minPreallocatedSamplesPerSeries), - Exemplars: make([]Exemplar, 0, minPreallocatedExemplarsPerSeries), + Labels: make([]*mimirpb_custom.LabelAdapter, 0, minPreallocatedLabels), + Samples: make([]*Sample, 0, minPreallocatedSamplesPerSeries), + Exemplars: make([]*Exemplar, 0, minPreallocatedExemplarsPerSeries), Histograms: nil, } }, @@ -107,7 +107,7 @@ func (p *PreallocTimeseries) RemoveLabel(labelName string) { } } -func (p *PreallocTimeseries) SetLabels(lbls []mimirpb_custom.LabelAdapter) { +func (p *PreallocTimeseries) SetLabels(lbls []*mimirpb_custom.LabelAdapter) { p.Labels = lbls // We can't reuse raw unmarshalled data for the timeseries after setting new labels. @@ -147,7 +147,7 @@ func (p *PreallocTimeseries) SortLabelsIfNeeded() { return } - slices.SortFunc(p.Labels, func(a, b mimirpb_custom.LabelAdapter) int { + slices.SortFunc(p.Labels, func(a, b *mimirpb_custom.LabelAdapter) int { switch { case a.Name < b.Name: return -1 @@ -384,7 +384,7 @@ func DeepCopyTimeseries(dst, src PreallocTimeseries, keepHistograms, keepExempla // Copy the samples. if cap(dstTs.Samples) < len(srcTs.Samples) { - dstTs.Samples = make([]Sample, len(srcTs.Samples)) + dstTs.Samples = make([]*Sample, len(srcTs.Samples)) } else { dstTs.Samples = dstTs.Samples[:len(srcTs.Samples)] } @@ -393,7 +393,7 @@ func DeepCopyTimeseries(dst, src PreallocTimeseries, keepHistograms, keepExempla // Copy the histograms. if keepHistograms { if cap(dstTs.Histograms) < len(srcTs.Histograms) { - dstTs.Histograms = make([]Histogram, len(srcTs.Histograms)) + dstTs.Histograms = make([]*Histogram, len(srcTs.Histograms)) } else { dstTs.Histograms = dstTs.Histograms[:len(srcTs.Histograms)] } @@ -407,18 +407,20 @@ func DeepCopyTimeseries(dst, src PreallocTimeseries, keepHistograms, keepExempla // Prepare the slice of exemplars. if keepExemplars { if cap(dstTs.Exemplars) < len(srcTs.Exemplars) { - dstTs.Exemplars = make([]Exemplar, len(srcTs.Exemplars)) + dstTs.Exemplars = make([]*Exemplar, len(srcTs.Exemplars)) } else { dstTs.Exemplars = dstTs.Exemplars[:len(srcTs.Exemplars)] } for exemplarIdx := range srcTs.Exemplars { + dstExemplar := &Exemplar{} // Copy the exemplar labels by using the prepared buffer. - dstTs.Exemplars[exemplarIdx].Labels, buf = copyToYoloLabels(buf, dstTs.Exemplars[exemplarIdx].Labels, srcTs.Exemplars[exemplarIdx].Labels) + dstExemplar.Labels, buf = copyToYoloLabels(buf, dstExemplar.Labels, srcTs.Exemplars[exemplarIdx].Labels) // Copy the other exemplar properties. - dstTs.Exemplars[exemplarIdx].Value = srcTs.Exemplars[exemplarIdx].Value - dstTs.Exemplars[exemplarIdx].TimestampMs = srcTs.Exemplars[exemplarIdx].TimestampMs + dstExemplar.Value = srcTs.Exemplars[exemplarIdx].Value + dstExemplar.TimestampMs = srcTs.Exemplars[exemplarIdx].TimestampMs + dstTs.Exemplars[exemplarIdx] = dstExemplar } } else { dstTs.Exemplars = dstTs.Exemplars[:0] @@ -461,16 +463,18 @@ func countTotalLabelLen(ts *TimeSeries, includeExemplars bool) int { // copyToYoloLabels copies the values of src to dst, it uses the given buffer to store all the string values in it. // The returned buffer is the remainder of the given buffer, which remains unused after the copying is complete. -func copyToYoloLabels(buf []byte, dst, src []mimirpb_custom.LabelAdapter) ([]mimirpb_custom.LabelAdapter, []byte) { +func copyToYoloLabels(buf []byte, dst, src []*mimirpb_custom.LabelAdapter) ([]*mimirpb_custom.LabelAdapter, []byte) { if cap(dst) < len(src) { - dst = make([]mimirpb_custom.LabelAdapter, len(src)) + dst = make([]*mimirpb_custom.LabelAdapter, len(src)) } else { dst = dst[:len(src)] } for labelIdx := range src { - dst[labelIdx].Name, buf = copyToYoloString(buf, src[labelIdx].Name) - dst[labelIdx].Value, buf = copyToYoloString(buf, src[labelIdx].Value) + dstLabel := &mimirpb_custom.LabelAdapter{} + dstLabel.Name, buf = copyToYoloString(buf, src[labelIdx].Name) + dstLabel.Value, buf = copyToYoloString(buf, src[labelIdx].Value) + dst[labelIdx] = dstLabel } return dst, buf @@ -486,7 +490,7 @@ func copyToYoloString(buf []byte, src string) (string, []byte) { // copyHistogram copies the given histogram by value. // The returned histogram does not share any memory with the given one. -func copyHistogram(src Histogram) Histogram { +func copyHistogram(src *Histogram) *Histogram { var ( dstCount isHistogram_Count dstZeroCount isHistogram_ZeroCount @@ -507,7 +511,7 @@ func copyHistogram(src Histogram) Histogram { dstZeroCount = &Histogram_ZeroCountFloat{ZeroCountFloat: src.GetZeroCountFloat()} } - return Histogram{ + return &Histogram{ Count: dstCount, Sum: src.Sum, Schema: src.Schema, diff --git a/pkg/mimirpb/timeseries_test.go b/pkg/mimirpb/timeseries_test.go index b3c8de15d59..39de9a2e6a6 100644 --- a/pkg/mimirpb/timeseries_test.go +++ b/pkg/mimirpb/timeseries_test.go @@ -69,8 +69,8 @@ func TestTimeseriesFromPool(t *testing.T) { t.Run("instance is cleaned before reusing", func(t *testing.T) { ts := TimeseriesFromPool() - ts.Labels = []mimirpb_custom.LabelAdapter{{Name: "foo", Value: "bar"}} - ts.Samples = []Sample{{Value: 1, TimestampMs: 2}} + ts.Labels = []*mimirpb_custom.LabelAdapter{{Name: "foo", Value: "bar"}} + ts.Samples = []*Sample{{Value: 1, TimestampMs: 2}} ReuseTimeseries(ts) reused := TimeseriesFromPool() @@ -115,15 +115,15 @@ func TestCopyToYoloString(t *testing.T) { func TestDeepCopyTimeseries(t *testing.T) { src := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "sampleLabel1", Value: "sampleValue1"}, {Name: "sampleLabel2", Value: "sampleValue2"}, }, - Samples: []Sample{ + Samples: []*Sample{ {Value: 1, TimestampMs: 2}, {Value: 3, TimestampMs: 4}, }, - Histograms: []Histogram{ + Histograms: []*Histogram{ { Timestamp: 4*time.Minute.Milliseconds() - 1, Count: &Histogram_CountInt{CountInt: 35}, @@ -137,10 +137,10 @@ func TestDeepCopyTimeseries(t *testing.T) { ResetHint: Histogram_UNKNOWN, }, }, - Exemplars: []Exemplar{{ + Exemplars: []*Exemplar{{ Value: 1, TimestampMs: 2, - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "exemplarLabel1", Value: "exemplarValue1"}, {Name: "exemplarLabel2", Value: "exemplarValue2"}, }, @@ -246,11 +246,11 @@ func TestDeepCopyTimeseries(t *testing.T) { func TestDeepCopyTimeseriesExemplars(t *testing.T) { src := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "sampleLabel1", Value: "sampleValue1"}, {Name: "sampleLabel2", Value: "sampleValue2"}, }, - Samples: []Sample{ + Samples: []*Sample{ {Value: 1, TimestampMs: 2}, {Value: 3, TimestampMs: 4}, }, @@ -258,10 +258,10 @@ func TestDeepCopyTimeseriesExemplars(t *testing.T) { } for i := 0; i < 100; i++ { - src.Exemplars = append(src.Exemplars, Exemplar{ + src.Exemplars = append(src.Exemplars, &Exemplar{ Value: 1, TimestampMs: 2, - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "exemplarLabel1", Value: "exemplarValue1"}, {Name: "exemplarLabel2", Value: "exemplarValue2"}, }, @@ -288,11 +288,11 @@ func TestPreallocTimeseries_Unmarshal(t *testing.T) { { src := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "sampleLabel1", Value: "sampleValue1"}, {Name: "sampleLabel2", Value: "sampleValue2"}, }, - Samples: []Sample{ + Samples: []*Sample{ {Value: 1, TimestampMs: 2}, {Value: 3, TimestampMs: 4}, }, @@ -382,7 +382,7 @@ func TestPreallocTimeseries_SortLabelsIfNeeded(t *testing.T) { t.Run("sorted", func(t *testing.T) { sorted := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}, {Name: "cluster", Value: "cluster"}, @@ -401,7 +401,7 @@ func TestPreallocTimeseries_SortLabelsIfNeeded(t *testing.T) { t.Run("unsorted", func(t *testing.T) { unsorted := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "sample", Value: "1"}, {Name: "cluster", Value: "cluster"}, @@ -424,7 +424,7 @@ func TestPreallocTimeseries_RemoveLabel(t *testing.T) { t.Run("with label", func(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}, }, @@ -433,14 +433,14 @@ func TestPreallocTimeseries_RemoveLabel(t *testing.T) { } p.RemoveLabel("bar") - require.Equal(t, []mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}}, p.Labels) + require.Equal(t, []*mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}}, p.Labels) require.Nil(t, p.marshalledData) }) t.Run("with no matching label", func(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}, }, @@ -449,7 +449,7 @@ func TestPreallocTimeseries_RemoveLabel(t *testing.T) { } p.RemoveLabel("foo") - require.Equal(t, []mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}}, p.Labels) + require.Equal(t, []*mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}}, p.Labels) require.NotNil(t, p.marshalledData) }) } @@ -458,7 +458,7 @@ func TestPreallocTimeseries_RemoveEmptyLabelValues(t *testing.T) { t.Run("with empty labels", func(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "empty1", Value: ""}, {Name: "bar", Value: "baz"}, @@ -469,14 +469,14 @@ func TestPreallocTimeseries_RemoveEmptyLabelValues(t *testing.T) { } p.RemoveEmptyLabelValues() - require.Equal(t, []mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}}, p.Labels) + require.Equal(t, []*mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}}, p.Labels) require.Nil(t, p.marshalledData) }) t.Run("without empty labels", func(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}, }, @@ -485,7 +485,7 @@ func TestPreallocTimeseries_RemoveEmptyLabelValues(t *testing.T) { } p.RemoveLabel("foo") - require.Equal(t, []mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}}, p.Labels) + require.Equal(t, []*mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}}, p.Labels) require.NotNil(t, p.marshalledData) }) } @@ -493,14 +493,14 @@ func TestPreallocTimeseries_RemoveEmptyLabelValues(t *testing.T) { func TestPreallocTimeseries_SetLabels(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Labels: []mimirpb_custom.LabelAdapter{ + Labels: []*mimirpb_custom.LabelAdapter{ {Name: "__name__", Value: "foo"}, {Name: "bar", Value: "baz"}, }, }, marshalledData: []byte{1, 2, 3}, } - expected := []mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "hello"}, {Name: "lbl", Value: "world"}} + expected := []*mimirpb_custom.LabelAdapter{{Name: "__name__", Value: "hello"}, {Name: "lbl", Value: "world"}} p.SetLabels(expected) require.Equal(t, expected, p.Labels) @@ -511,13 +511,13 @@ func TestPreallocTimeseries_ResizeExemplars(t *testing.T) { t.Run("should resize Exemplars when size is bigger than target size", func(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Exemplars: make([]Exemplar, 10), + Exemplars: make([]*Exemplar, 10), }, marshalledData: []byte{1, 2, 3}, } for i := range p.Exemplars { - p.Exemplars[i] = Exemplar{Labels: []mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: int64(i)} + p.Exemplars[i] = &Exemplar{Labels: []*mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: int64(i)} } p.ResizeExemplars(5) require.Len(t, p.Exemplars, 5) @@ -531,16 +531,16 @@ func BenchmarkPreallocTimeseries_SortLabelsIfNeeded(b *testing.B) { for _, lbCount := range bcs { b.Run(fmt.Sprintf("num_labels=%d", lbCount), func(b *testing.B) { // Generate labels set in reverse order for worst case. - unorderedLabels := make([]mimirpb_custom.LabelAdapter, 0, lbCount) + unorderedLabels := make([]*mimirpb_custom.LabelAdapter, 0, lbCount) for i := 0; i < lbCount; i++ { lbName := fmt.Sprintf("lbl_%d", lbCount-i) lbValue := fmt.Sprintf("val_%d", lbCount-i) - unorderedLabels = append(unorderedLabels, mimirpb_custom.LabelAdapter{Name: lbName, Value: lbValue}) + unorderedLabels = append(unorderedLabels, &mimirpb_custom.LabelAdapter{Name: lbName, Value: lbValue}) } b.Run("unordered", benchmarkSortLabelsIfNeeded(unorderedLabels)) - slices.SortFunc(unorderedLabels, func(a, b mimirpb_custom.LabelAdapter) int { + slices.SortFunc(unorderedLabels, func(a, b *mimirpb_custom.LabelAdapter) int { switch { case a.Name < b.Name: return -1 @@ -555,12 +555,12 @@ func BenchmarkPreallocTimeseries_SortLabelsIfNeeded(b *testing.B) { } } -func benchmarkSortLabelsIfNeeded(inputLabels []mimirpb_custom.LabelAdapter) func(b *testing.B) { +func benchmarkSortLabelsIfNeeded(inputLabels []*mimirpb_custom.LabelAdapter) func(b *testing.B) { return func(b *testing.B) { // Copy unordered labels set for each benchmark iteration. - benchmarkUnorderedLabels := make([][]mimirpb_custom.LabelAdapter, b.N) + benchmarkUnorderedLabels := make([][]*mimirpb_custom.LabelAdapter, b.N) for i := 0; i < b.N; i++ { - benchmarkLabels := make([]mimirpb_custom.LabelAdapter, len(inputLabels)) + benchmarkLabels := make([]*mimirpb_custom.LabelAdapter, len(inputLabels)) copy(benchmarkLabels, inputLabels) benchmarkUnorderedLabels[i] = benchmarkLabels } @@ -580,14 +580,14 @@ func benchmarkSortLabelsIfNeeded(inputLabels []mimirpb_custom.LabelAdapter) func func TestClearExemplars(t *testing.T) { t.Run("should reset TimeSeries.Exemplars keeping the slices if there are <= 10 entries", func(t *testing.T) { - ts := &TimeSeries{Exemplars: []Exemplar{ - {Labels: []mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: 2}, - {Labels: []mimirpb_custom.LabelAdapter{{Name: "trace", Value: "2"}, {Name: "service", Value: "B"}}, Value: 2, TimestampMs: 3}, + ts := &TimeSeries{Exemplars: []*Exemplar{ + {Labels: []*mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: 2}, + {Labels: []*mimirpb_custom.LabelAdapter{{Name: "trace", Value: "2"}, {Name: "service", Value: "B"}}, Value: 2, TimestampMs: 3}, }} ClearExemplars(ts) - assert.Equal(t, &TimeSeries{Exemplars: []Exemplar{}}, ts) + assert.Equal(t, &TimeSeries{Exemplars: []*Exemplar{}}, ts) assert.Equal(t, 2, cap(ts.Exemplars)) ts.Exemplars = ts.Exemplars[:2] @@ -597,9 +597,9 @@ func TestClearExemplars(t *testing.T) { }) t.Run("should reset TimeSeries.Exemplars releasing the slices if there are > 10 entries", func(t *testing.T) { - ts := &TimeSeries{Exemplars: make([]Exemplar, 11)} + ts := &TimeSeries{Exemplars: make([]*Exemplar, 11)} for i := range ts.Exemplars { - ts.Exemplars[i] = Exemplar{Labels: []mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: 2} + ts.Exemplars[i] = &Exemplar{Labels: []*mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: 2} } ClearExemplars(ts) @@ -613,9 +613,9 @@ func TestSortExemplars(t *testing.T) { t.Run("should sort TimeSeries.Exemplars in order", func(t *testing.T) { p := PreallocTimeseries{ TimeSeries: &TimeSeries{ - Exemplars: []Exemplar{ - {Labels: []mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: 3}, - {Labels: []mimirpb_custom.LabelAdapter{{Name: "trace", Value: "2"}, {Name: "service", Value: "B"}}, Value: 2, TimestampMs: 2}, + Exemplars: []*Exemplar{ + {Labels: []*mimirpb_custom.LabelAdapter{{Name: "trace", Value: "1"}, {Name: "service", Value: "A"}}, Value: 1, TimestampMs: 3}, + {Labels: []*mimirpb_custom.LabelAdapter{{Name: "trace", Value: "2"}, {Name: "service", Value: "B"}}, Value: 2, TimestampMs: 2}, }, }, marshalledData: []byte{1, 2, 3},