]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stream: also increment the retry stats counter on L7 retries
authorWilly Tarreau <w@1wt.eu>
Sat, 4 May 2019 08:38:31 +0000 (10:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 4 May 2019 08:40:00 +0000 (10:40 +0200)
It happens that the retries stats use their own counter and are not
derived from the stream interface, so we need to update it as well
when performing an L7 retry.

No backport is needed.

src/proto_htx.c

index 95b81c9e51ea8bb3b996aaf58e328c75626e1d43..2d1d8fb82b4b79a4edf0ca25605aac24dc912517 100644 (file)
@@ -1397,6 +1397,10 @@ static __inline int do_l7_retry(struct stream *s, struct stream_interface *si)
        if (si->conn_retries < 0)
                return -1;
 
+       if (objt_server(s->target))
+               _HA_ATOMIC_ADD(&__objt_server(s->target)->counters.retries, 1);
+       _HA_ATOMIC_ADD(&s->be->be_counters.retries, 1);
+
        req = &s->req;
        res = &s->res;
        /* Remove any write error from the request, and read error from the response */