mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-15 01:54:06 -08: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.go | ||
checkpoint_test.go | ||
live_reader.go | ||
reader.go | ||
reader_test.go | ||
wal.go | ||
wal_test.go | ||
watcher.go | ||
watcher_test.go |