mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: do not store inf values, since they may lead to significant precision loss for previously stored values
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/752
This commit is contained in:
parent
a2f647d142
commit
5a90a92378
1 changed files with 5 additions and 0 deletions
|
@ -1120,6 +1120,11 @@ func (s *Storage) add(rows []rawRow, mrs []MetricRow, precisionBits uint8) ([]ra
|
|||
// doesn't know how to work with them.
|
||||
continue
|
||||
}
|
||||
if math.IsInf(mr.Value, 0) {
|
||||
// Skip Inf values, since they may break precision for already stored data.
|
||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/752
|
||||
continue
|
||||
}
|
||||
if mr.Timestamp < minTimestamp {
|
||||
// Skip rows with too small timestamps outside the retention.
|
||||
if firstWarn == nil {
|
||||
|
|
Loading…
Reference in a new issue