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.
This commit is contained in:
Nikolay 2023-03-12 08:29:43 +01:00 committed by Aliaksandr Valialkin
parent e6fa18bfd2
commit d28ee6192d
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -1171,7 +1171,7 @@ func (s *Storage) prefetchMetricNames(qt *querytracer.Tracer, srcMetricIDs []uin
} }
} }
}) })
if err != nil { if err != nil && err != io.EOF {
return err return err
} }
qt.Printf("pre-fetch metric names for %d metric ids", len(metricIDs)) qt.Printf("pre-fetch metric names for %d metric ids", len(metricIDs))