]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream: fix age calculation in "show sess" output
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Mar 2025 17:56:13 +0000 (18:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Mar 2025 09:36:58 +0000 (10:36 +0100)
commit1cdf2869f6757946546a2ef102ce822e95de78f8
treefc591212c1ec6c7c31fab31c7085c1072126eaf6
parentdbb25720dd7157e0f180d17486f10340f80a9fda
BUG/MINOR: stream: fix age calculation in "show sess" output

The "show sess" output reports an age that's based on the last byte of
the HTTP request instead of the stream creation date, due to a confusion
between logs->request_ts and the request_date sample fetch function. Most
of the time these are equal except when the request is not yet full for
any reason (e.g. wait-body). This explains why a few "show sess" could
report a few new streams aged by 99 days for example.

Let's perform the correct request timestamp calculation like the sample
fetch function does, by adding t_idle and t_handshake to the accept_ts.
Now the stream's age is correct and can be correctly used with the
"show sess older <age>" variant.

This issue was introduced in 2.9 and the fix can be backported to 3.0.
src/stream.c