Remove repeated keyword from TimeSeries' metadata field

Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
This commit is contained in:
Paschalis Tsilias 2023-04-28 10:48:22 +03:00
parent 3acfa1bbfc
commit 7ee3ae6933
7 changed files with 115 additions and 122 deletions

View file

@ -776,7 +776,7 @@ 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"`
Metadatas []Metadata `protobuf:"bytes,5,rep,name=metadatas,proto3" json:"metadatas"`
Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -843,11 +843,11 @@ func (m *TimeSeries) GetHistograms() []Histogram {
return nil
}
func (m *TimeSeries) GetMetadatas() []Metadata {
func (m *TimeSeries) GetMetadata() Metadata {
if m != nil {
return m.Metadatas
return m.Metadata
}
return nil
return Metadata{}
}
type Label struct {
@ -1266,78 +1266,78 @@ func init() {
func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) }
var fileDescriptor_d938547f84707355 = []byte{
// 1126 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0xce, 0xee, 0xda, 0x6b, 0xef, 0xf1, 0x4f, 0x36, 0x43, 0x5a, 0x96, 0x88, 0xa6, 0x61, 0xa5,
0x82, 0x85, 0x90, 0xa3, 0xa6, 0x5c, 0x50, 0x51, 0x21, 0x25, 0xa9, 0xf3, 0x23, 0xb2, 0xb6, 0x3a,
0x76, 0x04, 0xe5, 0xc6, 0x9a, 0xd8, 0x13, 0x7b, 0xd5, 0xfd, 0x63,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, 0x0d, 0xdf, 0x0d, 0xc6, 0xa2, 0x09, 0x0b, 0xce, 0x86,
0xef, 0x06, 0xa2, 0xfa, 0x1d, 0x26, 0xed, 0xe4, 0x26, 0xb7, 0xa7, 0x5b, 0xca, 0x27, 0x37, 0xa9,
0xbd, 0x9b, 0x3e, 0x82, 0x26, 0x1f, 0x61, 0xa7, 0xfc, 0x08, 0x32, 0x40, 0xb7, 0x17, 0x4c, 0xc2,
0xa9, 0x1b, 0xcc, 0x8a, 0x17, 0x10, 0xc5, 0x23, 0x6f, 0xd5, 0xc4, 0xf2, 0xdb, 0x7e, 0x0e, 0xf5,
0x0c, 0xb5, 0xd6, 0xf6, 0xdf, 0x0f, 0xc4, 0x72, 0x5e, 0xd9, 0xc8, 0x2a, 0xfa, 0x00, 0x36, 0x4f,
0x2e, 0x06, 0x87, 0xa3, 0x71, 0x69, 0x4d, 0xdb, 0x3f, 0x42, 0x4b, 0x46, 0xa4, 0xd3, 0xff, 0xda,
0xb4, 0xfb, 0xa0, 0x4f, 0xc4, 0x09, 0x59, 0xcf, 0x6e, 0xad, 0xdd, 0x26, 0x73, 0x48, 0x60, 0x47,
0xdb, 0x6f, 0x6e, 0x77, 0x95, 0x3f, 0x6e, 0x77, 0x95, 0xbf, 0x6f, 0x77, 0x95, 0x1f, 0x74, 0x81,
0x8e, 0xae, 0xae, 0x74, 0xf9, 0x07, 0xf8, 0xe4, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xb0,
0xf6, 0x08, 0x32, 0x0a, 0x00, 0x00,
// 1130 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdb, 0x6e, 0xdb, 0x46,
0x13, 0x36, 0x49, 0x89, 0x12, 0x47, 0x07, 0xd3, 0xfb, 0x3b, 0xf9, 0x59, 0xa3, 0x71, 0x54, 0x02,
0x69, 0x85, 0xa2, 0x90, 0x11, 0xa7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xae, 0xc4, 0xed, 0x31, 0x09, 0xe6, 0x54, 0x5c, 0x52, 0x4b, 0x6e, 0x97, 0xb2, 0xc3,
0xec, 0x3f, 0x14, 0xa8, 0x1e, 0x2d, 0x96, 0xc1, 0x2b, 0xb4, 0x0b, 0x0d, 0xdf, 0x0d, 0x26, 0xa2,
0x05, 0x0b, 0xce, 0x86, 0xef, 0x06, 0xa2, 0xf6, 0x1d, 0x26, 0xed, 0xe4, 0x3a, 0xb7, 0xa7, 0x3b,
0xca, 0x27, 0xd7, 0xa9, 0xbd, 0x97, 0x7e, 0x04, 0x4d, 0x7e, 0x84, 0x9d, 0xf2, 0x47, 0x90, 0x01,
0x7a, 0xfd, 0x60, 0x1a, 0xce, 0xdc, 0x60, 0x5e, 0x7c, 0x01, 0x59, 0x67, 0xe2, 0x55, 0x4d, 0x2c,
0xcf, 0xf6, 0x73, 0xa8, 0x67, 0xa8, 0x3b, 0x4d, 0xff, 0xdd, 0x50, 0xac, 0xe6, 0xb5, 0x7d, 0xac,
0xa2, 0xff, 0xc1, 0xe6, 0xf1, 0xf9, 0xf0, 0x60, 0x3c, 0x29, 0x2d, 0x69, 0xfb, 0x07, 0x68, 0xc9,
0x88, 0x74, 0xf6, 0x6f, 0x5b, 0x76, 0x0f, 0xf4, 0xa9, 0xb8, 0x21, 0xeb, 0xd8, 0xad, 0x3b, 0xaf,
0xc9, 0x1c, 0x12, 0xd8, 0xe1, 0xf6, 0x9b, 0x9b, 0x5d, 0xe5, 0xf7, 0x9b, 0x5d, 0xe5, 0xaf, 0x9b,
0x5d, 0xe5, 0x7b, 0x5d, 0xa0, 0xa3, 0xcb, 0x4b, 0x5d, 0xfe, 0xff, 0x3d, 0xf9, 0x3b, 0x00, 0x00,
0xff, 0xff, 0xbd, 0xa4, 0x41, 0x7d, 0x30, 0x0a, 0x00, 0x00,
}
func (m *MetricMetadata) Marshal() (dAtA []byte, err error) {
@ -1798,10 +1798,8 @@ func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Metadatas) > 0 {
for iNdEx := len(m.Metadatas) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Metadatas[iNdEx].MarshalToSizedBuffer(dAtA[:i])
size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@ -1810,8 +1808,6 @@ func (m *TimeSeries) MarshalToSizedBuffer(dAtA []byte) (int, error) {
}
i--
dAtA[i] = 0x2a
}
}
if len(m.Histograms) > 0 {
for iNdEx := len(m.Histograms) - 1; iNdEx >= 0; iNdEx-- {
{
@ -2428,12 +2424,8 @@ func (m *TimeSeries) Size() (n int) {
n += 1 + l + sovTypes(uint64(l))
}
}
if len(m.Metadatas) > 0 {
for _, e := range m.Metadatas {
l = e.Size()
l = m.Metadata.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@ -3873,7 +3865,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Metadatas", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@ -3900,8 +3892,7 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Metadatas = append(m.Metadatas, Metadata{})
if err := m.Metadatas[len(m.Metadatas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex

View file

@ -147,7 +147,7 @@ message TimeSeries {
repeated Sample samples = 2 [(gogoproto.nullable) = false];
repeated Exemplar exemplars = 3 [(gogoproto.nullable) = false];
repeated Histogram histograms = 4 [(gogoproto.nullable) = false];
repeated Metadata metadatas = 5 [(gogoproto.nullable) = false];
Metadata metadata = 5 [(gogoproto.nullable) = false];
}
message Label {

View file

@ -57,7 +57,7 @@ var writeRequestFixture = &prompb.WriteRequest{
Samples: []prompb.Sample{{Value: 1, Timestamp: 0}},
Exemplars: []prompb.Exemplar{{Labels: []prompb.Label{{Name: "f", Value: "g"}}, Value: 1, Timestamp: 0}},
Histograms: []prompb.Histogram{HistogramToHistogramProto(0, &testHistogram), FloatHistogramToHistogramProto(1, testHistogram.ToFloat())},
Metadatas: []prompb.Metadata{{Type: prompb.Metadata_COUNTER, Help: "help text 1", Unit: "unit text 1"}},
Metadata: prompb.Metadata{Type: prompb.Metadata_COUNTER, Help: "help text 1", Unit: "unit text 1"},
},
{
Labels: []prompb.Label{
@ -70,7 +70,7 @@ var writeRequestFixture = &prompb.WriteRequest{
Samples: []prompb.Sample{{Value: 2, Timestamp: 1}},
Exemplars: []prompb.Exemplar{{Labels: []prompb.Label{{Name: "h", Value: "i"}}, Value: 2, Timestamp: 1}},
Histograms: []prompb.Histogram{HistogramToHistogramProto(2, &testHistogram), FloatHistogramToHistogramProto(3, testHistogram.ToFloat())},
Metadatas: []prompb.Metadata{{Type: prompb.Metadata_GAUGE, Help: "help text 2", Unit: "unit text 2"}},
Metadata: prompb.Metadata{Type: prompb.Metadata_GAUGE, Help: "help text 2", Unit: "unit text 2"},
},
},
}

View file

@ -1505,7 +1505,7 @@ func (s *shards) populateTimeSeries(batch []timeSeries, pendingData []prompb.Tim
pendingData[nPending].Histograms = pendingData[nPending].Histograms[:0]
}
if s.qm.sendMetadata {
pendingData[nPending].Metadatas = pendingData[nPending].Metadatas[:0]
pendingData[nPending].Metadata = prompb.Metadata{}
}
// Number of pending samples is limited by the fact that sendSamples (via sendSamplesWithBackoff)
@ -1533,20 +1533,20 @@ func (s *shards) populateTimeSeries(batch []timeSeries, pendingData []prompb.Tim
pendingData[nPending].Histograms = append(pendingData[nPending].Histograms, FloatHistogramToHistogramProto(d.timestamp, d.floatHistogram))
nPendingHistograms++
case tMetadata:
pendingData[nPending].Metadatas = append(pendingData[nPending].Metadatas, prompb.Metadata{
pendingData[nPending].Metadata = prompb.Metadata{
Type: metricTypeToProtoEquivalent(d.metadata.Type),
Help: d.metadata.Help,
Unit: d.metadata.Unit,
})
}
nPendingMetadata++
}
}
return nPendingSamples, nPendingExemplars, nPendingHistograms, nPendingMetadata
}
func (s *shards) sendSamples(ctx context.Context, samples []prompb.TimeSeries, sampleCount, exemplarCount, histogramCount, metadataCount int, pBuf *proto.Buffer, buf *[]byte) {
func (s *shards) sendSamples(ctx context.Context, series []prompb.TimeSeries, sampleCount, exemplarCount, histogramCount, metadataCount int, pBuf *proto.Buffer, buf *[]byte) {
begin := time.Now()
err := s.sendSamplesWithBackoff(ctx, samples, sampleCount, exemplarCount, histogramCount, metadataCount, pBuf, buf)
err := s.sendSamplesWithBackoff(ctx, series, sampleCount, exemplarCount, histogramCount, metadataCount, pBuf, buf)
if err != nil {
level.Error(s.qm.logger).Log("msg", "non-recoverable error", "count", sampleCount, "exemplarCount", exemplarCount, "err", err)
s.qm.metrics.failedSamplesTotal.Add(float64(sampleCount))
@ -1557,7 +1557,7 @@ func (s *shards) sendSamples(ctx context.Context, samples []prompb.TimeSeries, s
// These counters are used to calculate the dynamic sharding, and as such
// should be maintained irrespective of success or failure.
s.qm.dataOut.incr(int64(len(samples)))
s.qm.dataOut.incr(int64(len(series)))
s.qm.dataOutDuration.incr(int64(time.Since(begin)))
s.qm.lastSendTimestamp.Store(time.Now().Unix())
// Pending samples/exemplars/histograms also should be subtracted, as an error means
@ -1572,10 +1572,10 @@ func (s *shards) sendSamples(ctx context.Context, samples []prompb.TimeSeries, s
s.enqueuedMetadata.Sub(int64(metadataCount))
}
// sendSamples to the remote storage with backoff for recoverable errors.
func (s *shards) sendSamplesWithBackoff(ctx context.Context, samples []prompb.TimeSeries, sampleCount, exemplarCount, histogramCount, metadataCount int, pBuf *proto.Buffer, buf *[]byte) error {
// Build the WriteRequest with no metadata.
req, highest, err := buildWriteRequest(samples, nil, pBuf, *buf)
// sendSamplesWithBackoff to the remote storage with backoff for recoverable errors.
func (s *shards) sendSamplesWithBackoff(ctx context.Context, series []prompb.TimeSeries, sampleCount, exemplarCount, histogramCount, metadataCount int, pBuf *proto.Buffer, buf *[]byte) error {
// Build the WriteRequest with no separate metadata struct.
req, highest, err := buildWriteRequest(series, nil, pBuf, *buf)
if err != nil {
// Failing to build the write request is non-recoverable, since it will
// only error if marshaling the proto to bytes fails.

View file

@ -861,6 +861,8 @@ func (c *TestWriteClient) waitForExpectedData(tb testing.TB) {
}
}
var emptyMetadata prompb.Metadata
func (c *TestWriteClient) Store(_ context.Context, req []byte) error {
c.mtx.Lock()
defer c.mtx.Unlock()
@ -900,9 +902,10 @@ func (c *TestWriteClient) Store(_ context.Context, req []byte) error {
c.receivedHistograms[seriesName] = append(c.receivedHistograms[seriesName], histogram)
}
}
for _, metadata := range ts.Metadatas {
if ts.Metadata.String() != "" { // only count non-empty metadata
c.receivedTsMetadata[seriesName] = append(c.receivedTsMetadata[seriesName], ts.Metadata)
count++
c.receivedTsMetadata[seriesName] = append(c.receivedTsMetadata[seriesName], metadata)
}
}
if c.withWaitGroup {

View file

@ -146,13 +146,12 @@ func (h *writeHandler) write(ctx context.Context, req *prompb.WriteRequest) (err
}
}
for _, mp := range ts.Metadatas {
m := metadataProtoToMetadata(mp)
m := metadataProtoToMetadata(ts.Metadata)
_, err := app.UpdateMetadata(0, labels, m)
if err != nil {
level.Debug(h.logger).Log("msg", "error while updating metadata from remote write", "err", err)
}
}
}
if outOfOrderExemplarErrs > 0 {

View file

@ -80,10 +80,10 @@ func TestRemoteWriteHandler(t *testing.T) {
k++
}
for _, m := range ts.Metadatas {
m := ts.Metadata
require.Equal(t, mockMetadata{labels, int32(m.Type), m.Unit, m.Help}, appendable.metadata[l])
l++
}
}
}