]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stream: Don't incr frontend cum_req counter when stream is closed
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Feb 2020 10:51:11 +0000 (11:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Feb 2020 10:56:22 +0000 (11:56 +0100)
This counter is already incremented when a new request is received (or if an
error occurred waiting it). So it must not be incremented when the stream is
terminated, at the end of process_strem(). This bug was introduced by the commit
cff0f739e ("MINOR: counters: Review conditions to increment counters from
analysers").

No backport needed.

src/stream.c

index 38f1e4f0b4777350b2985e180594e0264b76f8b4..b36d70965919a80c21d527f9554a8414d7838059 100644 (file)
@@ -2394,7 +2394,6 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
 
                if (sess->fe->mode == PR_MODE_HTTP) {
                        _HA_ATOMIC_ADD(&sess->fe->fe_counters.p.http.rsp[n], 1);
-                       _HA_ATOMIC_ADD(&sess->fe->fe_counters.p.http.cum_req, 1);
                }
                if ((s->flags & SF_BE_ASSIGNED) &&
                    (s->be->mode == PR_MODE_HTTP)) {