]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: hlua: Report to SC when data were consumed on a lua socket
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 18 Jul 2025 14:07:16 +0000 (16:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Jul 2025 10:13:41 +0000 (12:13 +0200)
commit21e45a61d134786f42b046666aacced7a6ce3cc0
tree71e53c08f7054826e12776897a742886d6adfbba
parent48df877dab64bbe6580064bc7ce1c28270ad3884
BUG/MEDIUM: hlua: Report to SC when data were consumed on a lua socket

The lua cosocket are quite strange. There is an applet used to handle the
connection and writer and readers subscribed on it to write or read
data. Writers and readers are tasks woken up by the cosocket applet when
data can be consumed or produced, depending on the channels buffers
state. Then the cosocket applet is woken up by writers and readers when read
or write events were performed.

It means the cosocket applet has only few information on what was produced
or consumed. It is the writers and readers responsibility to notify any
blocking. Among other things, the readers must take care to notify the
stream on top of the cosocket applet that some data was consumed. Otherwise,
it may remain blocked, waiting for a write event (a write event from the
stream point of view is a read event from the cosocket point of view).

Thie patch must be backported as far as 2.8, and maybe to 2.6 too.
src/hlua.c