fix ingesting stale point, follow up fe8cc573d1 (#5179)

This commit is contained in:
Haleygo 2023-10-16 15:05:37 +08:00 committed by GitHub
parent 7abdbbc8e2
commit 8b6ccad41d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1720,7 +1720,7 @@ func (s *Storage) add(rows []rawRow, dstMrs []*MetricRow, mrs []MetricRow, preci
for i := range mrs {
mr := &mrs[i]
if math.IsNaN(mr.Value) {
if decimal.IsStaleNaN(mr.Value) {
if !decimal.IsStaleNaN(mr.Value) {
// Skip NaNs other than Prometheus staleness marker, since the underlying encoding
// doesn't know how to work with them.
continue