diff --git a/app/vmselect/prometheus/prometheus.go b/app/vmselect/prometheus/prometheus.go index df78fe659..130595694 100644 --- a/app/vmselect/prometheus/prometheus.go +++ b/app/vmselect/prometheus/prometheus.go @@ -91,6 +91,7 @@ func FederateHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, return fmt.Errorf("cannot fetch data for %q: %w", sq, err) } if isPartial && getDenyPartialResponse(r) { + rss.Cancel() return fmt.Errorf("cannot return full response, since some of vmstorage nodes are unavailable") } @@ -669,6 +670,7 @@ func SeriesHandler(startTime time.Time, at *auth.Token, w http.ResponseWriter, r return fmt.Errorf("cannot fetch data for %q: %w", sq, err) } if isPartial && getDenyPartialResponse(r) { + rss.Cancel() return fmt.Errorf("cannot return full response, since some of vmstorage nodes are unavailable") } diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index 2a49ae365..d411e785a 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -670,6 +670,7 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, name string, rf rollupFunc, return nil, err } if isPartial && ec.DenyPartialResponse { + rss.Cancel() return nil, fmt.Errorf("cannot return full response, since some of vmstorage nodes are unavailable") } rssLen := rss.Len()