diff --git a/storage/remote/wal_watcher.go b/storage/remote/wal_watcher.go index 48fba02d6..c399c0bac 100644 --- a/storage/remote/wal_watcher.go +++ b/storage/remote/wal_watcher.go @@ -234,7 +234,7 @@ func (w *WALWatcher) run() error { func (w *WALWatcher) findSegmentForIndex(index int) (int, error) { refs, err := w.segments(w.walDir) if err != nil { - return -1, nil + return -1, err } for _, r := range refs { @@ -249,7 +249,7 @@ func (w *WALWatcher) findSegmentForIndex(index int) (int, error) { func (w *WALWatcher) firstAndLast() (int, int, error) { refs, err := w.segments(w.walDir) if err != nil { - return -1, -1, nil + return -1, -1, err } if len(refs) == 0 {