mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 15:44:05 -08:00
Merge pull request #2906 from Gouthamve/error-ptr-match
Convert tsdb.ErrOutOfBounds to a storage error
This commit is contained in:
commit
9c8be7575c
|
@ -852,7 +852,7 @@ loop:
|
|||
sl.l.With("numDropped", numDuplicates).Warn("Error on ingesting samples with different value but same timestamp")
|
||||
}
|
||||
if numOutOfBounds > 0 {
|
||||
sl.l.With("numOutOfBounds", numOutOfBounds).Warn("Error on ingesting samples that are too old")
|
||||
sl.l.With("numOutOfBounds", numOutOfBounds).Warn("Error on ingesting samples that are too old or are too far into the future")
|
||||
}
|
||||
if err == nil {
|
||||
sl.cache.forEachStale(func(lset labels.Labels) bool {
|
||||
|
|
|
@ -125,6 +125,8 @@ func (a appender) Add(lset labels.Labels, t int64, v float64) (string, error) {
|
|||
return "", storage.ErrOutOfOrderSample
|
||||
case tsdb.ErrAmendSample:
|
||||
return "", storage.ErrDuplicateSampleForTimestamp
|
||||
case tsdb.ErrOutOfBounds:
|
||||
return "", storage.ErrOutOfBounds
|
||||
}
|
||||
return ref, err
|
||||
}
|
||||
|
@ -139,6 +141,8 @@ func (a appender) AddFast(ref string, t int64, v float64) error {
|
|||
return storage.ErrOutOfOrderSample
|
||||
case tsdb.ErrAmendSample:
|
||||
return storage.ErrDuplicateSampleForTimestamp
|
||||
case tsdb.ErrOutOfBounds:
|
||||
return storage.ErrOutOfBounds
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue