]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: applet: Let's applets decide if they have more data to deliver
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 22 Apr 2024 16:49:55 +0000 (18:49 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Apr 2024 05:33:10 +0000 (07:33 +0200)
commit589fb12904608f2f5dcd89ae1f61e229f0bc1865
tree823922bf1b6283f0a2c221997026541d9210c5a9
parent341bf913d478d80166f1e60d6ec7e309450032bb
BUG/MEDIUM: applet: Let's applets decide if they have more data to deliver

Unlike the muxes, the applets have the responsibility to notify the SC if
they have more data to deliver to the stream. The same is done to notify the
SC that applets must be woken up ASAP to continue some processing. When an
applet is woken up, we pretend it has no more data to deliver by setting
SE_FL_HAVE_NO_DATA flag. If the applet removes this flag, we must take care
to not set it again just after. Otherwise, the applet may remain blocked if
there is no other condition to wake it up.

It is an issue for the applets using their own buffers because
SE_FL_HAVE_NO_DATA is erroneously set in sc_applet_recv() function, after
the applet execution. For instance, it happens for the cli applet when a
huge map is cleared. No data are delivered to the stream but we pretend it
is the case to clear the map per batches.

This patch should fix the issue #2543. No Backported needed.
src/stconn.c