mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUG/MEDIUM: queues: Adjust the proxy counters when appropriate
In process_srv_queue(), if we manage to successfully run an extra task,
don't forget to adjust the proxy's totpend and served counters accordingly.
Having an inaccurate served could lead to various subtle bugs, as it is
used when making load balancing decisions.
This should not be backported, unless cda7275ef5
is backported too.
This commit is contained in:
parent
24042df94e
commit
659d5f6579
@ -452,8 +452,11 @@ int process_srv_queue(struct server *s)
|
||||
* checked, but before we set ready_srv so it would not see it,
|
||||
* just in case try to run one more stream.
|
||||
*/
|
||||
if (pendconn_process_next_strm(s, p, px_ok))
|
||||
if (pendconn_process_next_strm(s, p, px_ok)) {
|
||||
_HA_ATOMIC_SUB(&p->totpend, 1);
|
||||
_HA_ATOMIC_ADD(&p->served, 1);
|
||||
done++;
|
||||
}
|
||||
}
|
||||
return done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user