]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: lua: fix the impact of the scheduler changes again
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2017 14:07:33 +0000 (16:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2017 14:07:33 +0000 (16:07 +0200)
commitd9587418867d86aa503c249272634139fe909cbf
treeb9052043404a51e7d6431c27ab6dc89ddcf192cb
parent0c219be3dffa85b936048cc6b0ca45f3cf684d23
BUG/MAJOR: lua: fix the impact of the scheduler changes again

Commit d1aa41f ("BUG/MAJOR: lua: properly dequeue hlua_applet_wakeup()
for new scheduler") tried to address the side effects of the scheduler
changes on Lua, but it was not enough. Having some Lua code send data
in chunks separated by one second each clearly shows busy polling being
done.

The issue was tracked down to hlua_applet_wakeup() being woken up on
timer expiration, and returning itself without clearing the timeout,
causing the task to be re-inserted with an expiration date in the past,
thus firing again. In the past it was not a problem, as returning NULL
was enough to clear the timer. Now we can't rely on this anymore so
it's important to clear this timeout.

No backport is needed, this issue is specific to 1.8-dev and results
from an incomplete fix in the commit above.
src/hlua.c