mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-06 06:07:11 +02:00
Merge pull request #16242 from pr00se/drop-exemplars-sooner
TSDB: don't process exemplars older than minValidTime during WAL replay
This commit is contained in:
commit
eac37157ee
@ -142,10 +142,6 @@ func (h *Head) loadWAL(r *wlog.Reader, syms *labels.SymbolTable, multiRef map[ch
|
||||
missingSeries[e.Ref] = struct{}{}
|
||||
continue
|
||||
}
|
||||
|
||||
if e.T < h.minValidTime.Load() {
|
||||
continue
|
||||
}
|
||||
// At the moment the only possible error here is out of order exemplars, which we shouldn't see when
|
||||
// replaying the WAL, so lets just log the error if it's not that type.
|
||||
err = h.exemplars.AddExemplar(ms.labels(), exemplar.Exemplar{Ts: e.T, Value: e.V, Labels: e.Labels})
|
||||
@ -334,6 +330,9 @@ Outer:
|
||||
h.wlReplaytStonesPool.Put(v)
|
||||
case []record.RefExemplar:
|
||||
for _, e := range v {
|
||||
if e.T < h.minValidTime.Load() {
|
||||
continue
|
||||
}
|
||||
if r, ok := multiRef[e.Ref]; ok {
|
||||
e.Ref = r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user