VictoriaMetrics/app/vmalert/datasource
Roman Khavronenko ddf87b32ed
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>
2023-08-24 00:04:05 +02:00
..
datasource.go app/vmalert/datasource: substitute golang.org/x/exp/slices.SortFunc with sort.Slice 2023-07-24 18:58:01 -07:00
datasource_test.go vmalert: support rules backfilling (aka replay) (#1358) 2021-06-09 12:20:38 +03:00
init.go fixed typos in documentation and commandline flags descriptions (#4275) 2023-05-10 09:50:41 +02:00
vm.go vmalert: correctly re-instantinate HTTP req on retries (#4864) 2023-08-24 00:04:05 +02:00
vm_graphite_api.go app/vmalert/datasource/graphite: allow overriding "from" parameter for datasource queries (#4687) 2023-07-21 14:28:10 +04:00
vm_prom_api.go vmalert:fix query request using rfc3339 format (#4577) 2023-07-07 10:39:25 +02:00
vm_prom_api_test.go vmalert: reduce allocations for Prometheus resp parse (#3435) 2022-12-05 08:34:54 +01:00
vm_test.go vmalert: correctly re-instantinate HTTP req on retries (#4864) 2023-08-24 00:04:05 +02:00