]> git.kaiwu.me - haproxy.git/commit
[MAJOR] session: fix the order by which the analysers are run
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Jan 2010 22:53:24 +0000 (23:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Jan 2010 23:01:03 +0000 (00:01 +0100)
commit1e0bbafcbe28d2d0651d4d25199ed91fe6b9eebb
tree6d27cfd853f9f2aabbc66c46356aec006b5bfec8
parent034550b7420c24625a975f023797d30a14b80830
[MAJOR] session: fix the order by which the analysers are run

With the introduction of keep-alive, we have created situations
where an analyser can add other analysers to the current list,
which are behind it, which have already been processed once, and
which are needed immediately because without them there will be
no more I/O activity. This is typically the case for enabling
reading of a new request after preparing for a new request.

Instead of creating specific cases for some analysers (there was
already one such before), we now use a little bit of algorithmics
to create an ordered bit chain supporting priorities and fast
operations.

Another advantage of this new construction is that it's not a
real loop anymore, so if an analyser is unknown, it will not
loop but just ignore it.

Note that it is easy to skip multiple analysers at once now in
order to speed up the checking a bit. Some test code has shown
a minor gain though.

This change has been carefully re-read and has no direct reason
of causing a regression. However it has been tagged "major"
because the fact that it runs the analysers correctly might
trigger an old sleeping bug somewhere in one of the analysers.
src/session.c