]> git.kaiwu.me - haproxy.git/commit
[MEDIUM] fix stats socket limitation to 16 kB
authorWilly Tarreau <w@1wt.eu>
Mon, 17 Mar 2008 20:38:24 +0000 (21:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 17 Mar 2008 20:43:47 +0000 (21:43 +0100)
commit28d65acf7ab7e34e2ee194b1c05afafad64e25fa
treec3e224ce1d0b14198a0ac4d93b9293e1227e47e5
parent682c3c1be3238c5dfd21e6af6b07aeeca45a3730
[MEDIUM] fix stats socket limitation to 16 kB

Due to the way the stats socket work, it was not possible to
maintain the information related to the command entered, so
after filling a whole buffer, the request was lost and it was
considered that there was nothing to write anymore.

The major reason was that some flags were passed directly
during the first call to stats_dump_raw() instead of being
stored persistently in the session.

To definitely fix this problem, flags were added to the stats
member of the session structure.

A second problem appeared. When the stats were produced, a first
call to client_retnclose() was performed, then one or multiple
subsequent calls to buffer_write_chunks() were done. But once the
stats buffer was full and a reschedule operated, the buffer was
flushed, the write flag cleared from the buffer and nothing was
done to re-arm it.

For this reason, a check was added in the proto_uxst_stats()
function in order to re-call the client FSM when data were added
by stats_dump_raw(). Finally, the whole unix stats dump FSM was
rewritten to avoid all the magics it depended on. It is now
simpler and looks more like the HTTP one.
include/proto/dumpstats.h
include/types/session.h
src/dumpstats.c
src/proto_http.c
src/proto_uxst.c