tsdb/wlog: Only treat unknown record types as failure

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
pull/14042/head
Arve Knudsen 11 months ago
parent 4b7a44c7a0
commit fb6a45f06b

@ -7,6 +7,7 @@
* [ENHANCEMENT] OTLP: Improve remote write format translation performance by using label set hashes for metric identifiers instead of string based ones. #14006 #13991 * [ENHANCEMENT] OTLP: Improve remote write format translation performance by using label set hashes for metric identifiers instead of string based ones. #14006 #13991
* [BUGFIX] OTLP: Don't generate target_info unless at least one identifying label is defined. #13991 * [BUGFIX] OTLP: Don't generate target_info unless at least one identifying label is defined. #13991
* [BUGFIX] OTLP: Don't generate target_info unless there are metrics. #13991 * [BUGFIX] OTLP: Don't generate target_info unless there are metrics. #13991
* [BUGFIX] tsdb/wlog.Watcher.readSegmentForGC: Only count unknown record types against record_decode_failures_total metric. #14042
## 2.52.0-rc.1 / 2024-05-03 ## 2.52.0-rc.1 / 2024-05-03

@ -685,14 +685,12 @@ func (w *Watcher) readSegmentForGC(r *LiveReader, segmentNum int, _ bool) error
} }
w.writer.UpdateSeriesSegment(series, segmentNum) w.writer.UpdateSeriesSegment(series, segmentNum)
// Ignore these; we're only interested in series. case record.Unknown:
case record.Samples:
case record.Exemplars:
case record.Tombstones:
default:
// Could be corruption, or reading from a WAL from a newer Prometheus. // Could be corruption, or reading from a WAL from a newer Prometheus.
w.recordDecodeFailsMetric.Inc() w.recordDecodeFailsMetric.Inc()
default:
// We're only interested in series.
} }
} }
if err := r.Err(); err != nil { if err := r.Err(); err != nil {

Loading…
Cancel
Save