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

This commit is contained in:
Haleygo 2023-10-16 15:05:37 +08:00 committed by Aliaksandr Valialkin
parent 700d83db93
commit 93589ecccf
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -1828,7 +1828,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