From 5328a102e03af7935a8b797824c42fca176f7c66 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 27 Jan 2021 14:38:26 +0200 Subject: [PATCH] app/vmselect: unconditionally deny partial responses from `/api/v1/export*` It is expected that `/api/v1/export*` returns full data, so there is no sense in partial responses there. --- app/vmselect/prometheus/prometheus.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/vmselect/prometheus/prometheus.go b/app/vmselect/prometheus/prometheus.go index 7fad450331..0bad941379 100644 --- a/app/vmselect/prometheus/prometheus.go +++ b/app/vmselect/prometheus/prometheus.go @@ -387,14 +387,11 @@ func exportHandler(at *auth.Token, w http.ResponseWriter, r *http.Request, match resultsCh := make(chan *quicktemplate.ByteBuffer, cgroup.AvailableCPUs()) doneCh := make(chan error) if !reduceMemUsage { - denyPartialResponse := searchutils.GetDenyPartialResponse(r) - rss, isPartial, err := netstorage.ProcessSearchQuery(at, denyPartialResponse, sq, true, deadline) + denyPartialResponse := true + rss, _, err := netstorage.ProcessSearchQuery(at, denyPartialResponse, sq, true, deadline) if err != nil { return fmt.Errorf("cannot fetch data for %q: %w", sq, err) } - if isPartial { - return fmt.Errorf("cannot export data, because some of vmstorage nodes are unhealthy") - } go func() { err := rss.RunParallel(func(rs *netstorage.Result, workerID uint) error { if err := bw.Error(); err != nil {