From a422165dc61f614b5d379a6548ecb93e717b964b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 13 May 2021 16:16:16 +0300 Subject: [PATCH] app/vmagent/remotewrite: clarify the comment explaining why vmagent drops blocks if remote storage returns 400 or 409 status code --- app/vmagent/remotewrite/client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/vmagent/remotewrite/client.go b/app/vmagent/remotewrite/client.go index 580d2625e..103e8848b 100644 --- a/app/vmagent/remotewrite/client.go +++ b/app/vmagent/remotewrite/client.go @@ -260,11 +260,9 @@ again: } metrics.GetOrCreateCounter(fmt.Sprintf(`vmagent_remotewrite_requests_total{url=%q, status_code="%d"}`, c.sanitizedURL, statusCode)).Inc() if statusCode == 409 || statusCode == 400 { - // Just drop block on 409 status code like Prometheus does. + // Just drop block on 409 and 400 status codes like Prometheus does. // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/873 - // drop block on 400 status code, - // not expected that remote server will be able to handle it on retry - // should fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1149 + // and https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1149 _ = resp.Body.Close() c.packetsDropped.Inc() return true