check latest exemplar timestamp (#8782)

Signed-off-by: yeya24 <yb532204897@gmail.com>
This commit is contained in:
Ben Ye 2021-05-05 11:28:48 -04:00 committed by GitHub
parent 27b78c336e
commit 9e8df5ade9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,6 +121,9 @@ func (ce *CircularExemplarStorage) Select(start, end int64, matchers ...[]*label
for _, idx := range ce.index {
var se exemplar.QueryResult
e := ce.exemplars[idx.oldest]
if e.exemplar.Ts > end || ce.exemplars[idx.newest].exemplar.Ts < start {
continue
}
if !matchesSomeMatcherSet(e.seriesLabels, matchers) {
continue
}