From b6a1372d2356fbcede0790c38da9aa663c413b15 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Sun, 12 Mar 2023 08:29:43 +0100 Subject: [PATCH] lib/storage: correctly handle io.EOF error for pre-fetched metrics (#3946) io.EOF shouldn't be returned from this function. It breaks all search API logic and may result in empty query results. --- lib/storage/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 7cee37cbd..3e9a2753c 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -1245,7 +1245,7 @@ func (s *Storage) prefetchMetricNames(qt *querytracer.Tracer, tsids []TSID, dead } } }) - if err != nil { + if err != nil && err != io.EOF { return err } qt.Printf("pre-fetch metric names for %d metric ids", len(metricIDs))