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 GitHub
parent c0c3dc02cf
commit 927d9da270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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