mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
Merge branch 'release-1.6'
This commit is contained in:
commit
46226088aa
|
@ -946,6 +946,7 @@ func (s *MemorySeriesStorage) Append(sample *model.Sample) error {
|
|||
s.discardedSamples.WithLabelValues(outOfOrderTimestamp).Inc()
|
||||
return ErrOutOfOrderSample // Caused by the caller.
|
||||
}
|
||||
headChunkWasClosed := series.headChunkClosed
|
||||
completedChunksCount, err := series.add(model.SamplePair{
|
||||
Value: sample.Value,
|
||||
Timestamp: sample.Timestamp,
|
||||
|
@ -954,6 +955,11 @@ func (s *MemorySeriesStorage) Append(sample *model.Sample) error {
|
|||
s.quarantineSeries(fp, sample.Metric, err)
|
||||
return err
|
||||
}
|
||||
if headChunkWasClosed {
|
||||
// Appending to a series with a closed head chunk creates an
|
||||
// additional open head chunk.
|
||||
s.headChunks.Inc()
|
||||
}
|
||||
s.ingestedSamples.Inc()
|
||||
s.incNumChunksToPersist(completedChunksCount)
|
||||
|
||||
|
|
Loading…
Reference in a new issue