mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Remove references to custom values record
This commit is contained in:
parent
6d413fad36
commit
cfcd51538d
|
@ -87,7 +87,6 @@ type Head struct {
|
|||
logger *slog.Logger
|
||||
appendPool zeropool.Pool[[]record.RefSample]
|
||||
exemplarsPool zeropool.Pool[[]exemplarWithSeriesRef]
|
||||
customValuesPool zeropool.Pool[[]record.RefCustomValues]
|
||||
histogramsPool zeropool.Pool[[]record.RefHistogramSample]
|
||||
floatHistogramsPool zeropool.Pool[[]record.RefFloatHistogramSample]
|
||||
metadataPool zeropool.Pool[[]record.RefMetadata]
|
||||
|
@ -2135,7 +2134,6 @@ type memSeries struct {
|
|||
// We keep the last histogram value here (in addition to appending it to the chunk) so we can check for duplicates.
|
||||
lastHistogramValue *histogram.Histogram
|
||||
lastFloatHistogramValue *histogram.FloatHistogram
|
||||
customValues []float64
|
||||
|
||||
// Current appender for the head chunk. Set when a new head chunk is cut.
|
||||
// It is nil only if headChunks is nil. E.g. if there was an appender that created a new series, but rolled back the commit
|
||||
|
|
|
@ -1458,17 +1458,6 @@ func (a *headAppender) Commit() (err error) {
|
|||
a.commitFloatHistograms(acc)
|
||||
a.commitMetadata()
|
||||
|
||||
a.head.metrics.outOfOrderSamples.WithLabelValues(sampleMetricTypeFloat).Add(float64(acc.floatOOORejected))
|
||||
a.head.metrics.outOfOrderSamples.WithLabelValues(sampleMetricTypeHistogram).Add(float64(acc.histoOOORejected))
|
||||
a.head.metrics.outOfBoundSamples.WithLabelValues(sampleMetricTypeFloat).Add(float64(acc.floatOOBRejected))
|
||||
a.head.metrics.tooOldSamples.WithLabelValues(sampleMetricTypeFloat).Add(float64(acc.floatTooOldRejected))
|
||||
a.head.metrics.samplesAppended.WithLabelValues(sampleMetricTypeFloat).Add(float64(acc.floatsAppended))
|
||||
a.head.metrics.samplesAppended.WithLabelValues(sampleMetricTypeHistogram).Add(float64(acc.histogramsAppended))
|
||||
a.head.metrics.outOfOrderSamplesAppended.WithLabelValues(sampleMetricTypeFloat).Add(float64(acc.oooFloatsAccepted))
|
||||
a.head.metrics.outOfOrderSamplesAppended.WithLabelValues(sampleMetricTypeHistogram).Add(float64(acc.oooHistogramAccepted))
|
||||
a.head.updateMinMaxTime(acc.inOrderMint, acc.inOrderMaxt)
|
||||
a.head.updateMinOOOMaxOOOTime(acc.oooMinT, acc.oooMaxT)
|
||||
|
||||
acc.collectOOORecords(a)
|
||||
if a.head.wbl != nil {
|
||||
if err := a.head.wbl.Log(acc.oooRecords...); err != nil {
|
||||
|
|
|
@ -332,19 +332,6 @@ Outer:
|
|||
if r, ok := multiRef[sam.Ref]; ok {
|
||||
sam.Ref = r
|
||||
}
|
||||
if histogram.IsCustomBucketsSchema(sam.H.Schema) {
|
||||
ms := h.series.getByID(sam.Ref)
|
||||
if ms == nil {
|
||||
unknownHistogramRefs.Inc()
|
||||
continue
|
||||
}
|
||||
|
||||
if ms.lastFloatHistogramValue != nil {
|
||||
sam.H.CustomValues = ms.lastFloatHistogramValue.CustomValues
|
||||
} else {
|
||||
sam.H.CustomValues = ms.customValues
|
||||
}
|
||||
}
|
||||
mod := uint64(sam.Ref) % uint64(concurrency)
|
||||
histogramShards[mod] = append(histogramShards[mod], histogramRecord{ref: sam.Ref, t: sam.T, h: sam.H})
|
||||
}
|
||||
|
@ -381,14 +368,6 @@ Outer:
|
|||
if r, ok := multiRef[sam.Ref]; ok {
|
||||
sam.Ref = r
|
||||
}
|
||||
if histogram.IsCustomBucketsSchema(sam.FH.Schema) {
|
||||
ms := h.series.getByID(sam.Ref)
|
||||
if ms == nil {
|
||||
unknownHistogramRefs.Inc()
|
||||
continue
|
||||
}
|
||||
sam.FH.CustomValues = ms.customValues
|
||||
}
|
||||
mod := uint64(sam.Ref) % uint64(concurrency)
|
||||
histogramShards[mod] = append(histogramShards[mod], histogramRecord{ref: sam.Ref, t: sam.T, fh: sam.FH})
|
||||
}
|
||||
|
@ -641,22 +620,8 @@ func (wp *walSubsetProcessor) processWALSamples(h *Head, mmappedChunks, oooMmapp
|
|||
|
||||
var chunkCreated bool
|
||||
if s.h != nil {
|
||||
//if histogram.IsCustomBucketsSchema(s.h.Schema) {
|
||||
// if ms.lastHistogramValue != nil {
|
||||
//
|
||||
// }
|
||||
//}
|
||||
_, chunkCreated = ms.appendHistogram(s.t, s.h, 0, appendChunkOpts)
|
||||
} else {
|
||||
//if histogram.IsCustomBucketsSchema(s.fh.Schema) {
|
||||
// if ms.lastFloatHistogramValue != nil {
|
||||
// s.h.CustomValues = ms.lastFloatHistogramValue.CustomValues
|
||||
// } else {
|
||||
// s.h.CustomValues = ms.customValues
|
||||
// }
|
||||
// //customVals := h.
|
||||
// //s.h.CustomValues =
|
||||
//}
|
||||
_, chunkCreated = ms.appendFloatHistogram(s.t, s.fh, 0, appendChunkOpts)
|
||||
}
|
||||
if chunkCreated {
|
||||
|
|
|
@ -52,7 +52,6 @@ const (
|
|||
HistogramSamples Type = 7
|
||||
// FloatHistogramSamples is used to match WAL records of type Float Histograms.
|
||||
FloatHistogramSamples Type = 8
|
||||
CustomValues Type = 9
|
||||
)
|
||||
|
||||
func (rt Type) String() string {
|
||||
|
@ -73,8 +72,6 @@ func (rt Type) String() string {
|
|||
return "mmapmarkers"
|
||||
case Metadata:
|
||||
return "metadata"
|
||||
case CustomValues:
|
||||
return "custom_values"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
|
@ -150,11 +147,6 @@ type RefSeries struct {
|
|||
Labels labels.Labels
|
||||
}
|
||||
|
||||
type RefCustomValues struct {
|
||||
Ref chunks.HeadSeriesRef
|
||||
CustomValues []float64
|
||||
}
|
||||
|
||||
// RefSample is a timestamp/value pair associated with a reference to a series.
|
||||
// TODO(beorn7): Perhaps make this "polymorphic", including histogram and float-histogram pointers? Then get rid of RefHistogramSample.
|
||||
type RefSample struct {
|
||||
|
@ -215,7 +207,7 @@ func (d *Decoder) Type(rec []byte) Type {
|
|||
return Unknown
|
||||
}
|
||||
switch t := Type(rec[0]); t {
|
||||
case Series, Samples, Tombstones, Exemplars, MmapMarkers, Metadata, HistogramSamples, FloatHistogramSamples, CustomValues:
|
||||
case Series, Samples, Tombstones, Exemplars, MmapMarkers, Metadata, HistogramSamples, FloatHistogramSamples:
|
||||
return t
|
||||
}
|
||||
return Unknown
|
||||
|
|
Loading…
Reference in a new issue