VictoriaMetrics/app/vmalert/datasource
Roman Khavronenko 68150655d2
vmalert: correctly re-instantinate HTTP req on retries (#4864)
* vmalert: correctly re-instantinate HTTP req on retries

Previosly, request retry to datasource re-used existing HTTP request.
But if request object was already partially processed (body was read),
then retry will be unsuccessful.

The change re-instantinates HTTP request object before retry.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* vmalert: review fix

Signed-off-by: hagen1778 <roman@victoriametrics.com>

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit ddf87b32ed)
2023-08-27 09:04:42 +02:00
..
datasource.go app/vmalert/datasource: substitute golang.org/x/exp/slices.SortFunc with sort.Slice 2023-07-24 19:17:19 -07:00
datasource_test.go vmalert: support rules backfilling (aka replay) (#1358) 2021-06-09 12:30:54 +03:00
init.go fixed typos in documentation and commandline flags descriptions (#4275) 2023-05-10 02:22:06 -07:00
vm.go vmalert: correctly re-instantinate HTTP req on retries (#4864) 2023-08-27 09:04:42 +02:00
vm_graphite_api.go app/vmalert/datasource/graphite: allow overriding "from" parameter for datasource queries (#4687) 2023-07-22 14:18:52 -07:00
vm_prom_api.go vmalert:fix query request using rfc3339 format (#4577) 2023-07-09 11:03:10 -07:00
vm_prom_api_test.go vmalert: reduce allocations for Prometheus resp parse (#3435) 2022-12-05 00:18:11 -08:00
vm_test.go vmalert: correctly re-instantinate HTTP req on retries (#4864) 2023-08-27 09:04:42 +02:00