mirror of
https://github.com/prometheus/prometheus
synced 2025-01-08 07:32:10 +00:00
a484a83d4a
Calling `wal.NewSegmentBufReader()` without any segments would cause a `panic` resulting in prometheus crashing. This patch fixes the panic by making segmentBufReader return a EOF if there are not segments. This also means an empty checkpoint directory which should never be the case unless it has been tampered with (or has issues due to the underlying filesystem e.g. NFS) would be ignored by Prometheus and would continue to run instead of the current behaviour which is to panic. Fixes: https://github.com/prometheus/prometheus/issues/9605 Signed-off-by: Sunil Thaha <sthaha@redhat.com> |
||
---|---|---|
.. | ||
checkpoint_test.go | ||
checkpoint.go | ||
live_reader.go | ||
reader_test.go | ||
reader.go | ||
wal_test.go | ||
wal.go | ||
watcher_test.go | ||
watcher.go |