@ -164,7 +164,7 @@ type memorySeriesStorage struct {
seriesOps * prometheus . CounterVec
ingestedSamplesCount prometheus . Counter
outOfOrderSamplesCount prometheus . Counter
invalidPreloadRequest sCount prometheus . Counter
nonExistentSeriesMatche sCount prometheus . Counter
maintainSeriesDuration * prometheus . SummaryVec
persistenceUrgencyScore prometheus . Gauge
rushedMode prometheus . Gauge
@ -248,11 +248,11 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) Storage {
Name : "out_of_order_samples_total" ,
Help : "The total number of samples that were discarded because their timestamps were at or before the last received sample for a series." ,
} ) ,
invalidPreloadRequest sCount: prometheus . NewCounter ( prometheus . CounterOpts {
nonExistentSeriesMatche sCount: prometheus . NewCounter ( prometheus . CounterOpts {
Namespace : namespace ,
Subsystem : subsystem ,
Name : "invalid_preload_request s_total" ,
Help : "The total number of preload requests referring to a non-existent series . This is an indication of outdated label indexes." ,
Name : "non_existent_series_matche s_total" ,
Help : "How often a non-existent series was referred to during label matching or chunk preloading . This is an indication of outdated label indexes." ,
} ) ,
maintainSeriesDuration : prometheus . NewSummaryVec (
prometheus . SummaryOpts {
@ -545,7 +545,11 @@ func (s *memorySeriesStorage) metricForRange(
// The range lookup is relatively cheap, so let's do it first if
// we have a chance the archived metric is not in the range.
has , first , last := s . persistence . hasArchivedMetric ( fp )
if ! has || first . After ( through ) || last . Before ( from ) {
if ! has {
s . nonExistentSeriesMatchesCount . Inc ( )
return nil , nil , false
}
if first . After ( through ) || last . Before ( from ) {
return nil , nil , false
}
}
@ -1492,7 +1496,7 @@ func (s *memorySeriesStorage) Describe(ch chan<- *prometheus.Desc) {
s . seriesOps . Describe ( ch )
ch <- s . ingestedSamplesCount . Desc ( )
ch <- s . outOfOrderSamplesCount . Desc ( )
ch <- s . invalidPreloadRequest sCount. Desc ( )
ch <- s . nonExistentSeriesMatche sCount. Desc ( )
ch <- numMemChunksDesc
s . maintainSeriesDuration . Describe ( ch )
ch <- s . persistenceUrgencyScore . Desc ( )
@ -1519,7 +1523,7 @@ func (s *memorySeriesStorage) Collect(ch chan<- prometheus.Metric) {
s . seriesOps . Collect ( ch )
ch <- s . ingestedSamplesCount
ch <- s . outOfOrderSamplesCount
ch <- s . invalidPreloadRequest sCount
ch <- s . nonExistentSeriesMatche sCount
ch <- prometheus . MustNewConstMetric (
numMemChunksDesc ,
prometheus . GaugeValue ,