mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-14 16:12:15 +01:00
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.
This commit is contained in:
parent
ff526492eb
commit
5328a102e0
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user