diff --git a/docs/components/query.md b/docs/components/query.md index 31c5e4c0bcc..972796eecaf 100644 --- a/docs/components/query.md +++ b/docs/components/query.md @@ -270,7 +270,7 @@ Flags: if no max_source_resolution param is specified. --query.partial-response Enable partial response for queries if no partial_response param is specified. - --store.response-timeout=0ms + --store.response-timeout=0ms If a Store doesn't send any data in this specified duration then a Store will be ignored and partial data will be returned if it's diff --git a/pkg/store/proxy.go b/pkg/store/proxy.go index b75ea6d1f75..ddb18996d70 100644 --- a/pkg/store/proxy.go +++ b/pkg/store/proxy.go @@ -334,10 +334,10 @@ func startStreamSeriesSet( // Next blocks until new message is received or stream is closed or operation is timed out. func (s *streamSeriesSet) Next() (ok bool) { ctx := s.ctx - timeoutMsg := "" + timeoutMsg := fmt.Sprintf("failed to receive any data from %s", s.name) if s.responseTimeout != 0 { - timeoutMsg = s.responseTimeout.String() + timeoutMsg = fmt.Sprintf("failed to receive any data in %s from %s", s.responseTimeout.String(), s.name) timeoutCtx, done := context.WithTimeout(s.ctx, s.responseTimeout) defer done() @@ -351,8 +351,7 @@ func (s *streamSeriesSet) Next() (ok bool) { //shutdown a goroutine in startStreamSeriesSet s.closeSeries() - err := errors.Wrapf(ctx.Err(), "failed to receive any data in %s from %s", timeoutMsg, s.name) - + err := errors.Wrap(ctx.Err(), timeoutMsg) if s.partialResponse { level.Warn(s.logger).Log("err", err, "msg", "returning partial response") s.warnCh.send(storepb.NewWarnSeriesResponse(err))