app/vmselect/prometheus: allow returning partial response from /api/v1/export if -search.denyPartialResponse=false

This makes `/api/v1/export` behaviour consistent with other `/api/v1/*` handlers.
This commit is contained in:
Aliaksandr Valialkin 2020-06-12 21:10:33 +03:00
parent 35191d8403
commit 936f35920a

View File

@ -215,7 +215,7 @@ func exportHandler(at *auth.Token, w http.ResponseWriter, matches []string, star
if err != nil {
return fmt.Errorf("cannot fetch data for %q: %s", sq, err)
}
if isPartial {
if isPartial && getDenyPartialResponse(r) {
rss.Cancel()
return fmt.Errorf("cannot return full response, since some of vmstorage nodes are unavailable")
}