mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-31 10:31:46 +00:00
haproxy public development tree
90304dcdd8
When stats_putchk() fails to peform the dump because available data space in htx is less than the number of bytes pending in the dump buffer, we wait for more room in the htx (ie: sc_need_room()) to retry the dump attempt on the next applet invocation. To provide consistent output, we have to make sure that the stat ctx is not updated (or at least correctly reverted) in case stats_putchk() fails so that the new dumping attempt behaves just like the previous (failed) one. STAT_STARTED is not following this logic, the flag is set in stats_dump_fields_json() as soon as some data is written to the output buffer. It's done too early: we need to delay this step after the stats_putchk() has successfully returned if we want to correctly handle the retries attempts. Because of this, JSON output could suffer from extraneous ',' characters which could make json parsers unhappy. For example, this is the kind of errors you could get when using `python -m json.tool` on such badly formatted outputs: "Expecting value: line 1 column 2 (char 1)" Unfortunately, fixing this means that the flag needs to be enabled at multiple places, which is what we're doing in this patch. (in stats_dump_proxy_to_buffer() where stats_dump_one_line() is involved by underlying stats_dump_{fe,li,sv,be} functions) Thereby, this raises the need for a cleanup to reduce code duplication around stats_dump_proxy_to_buffer() function and simplify things a bit. It could be backported to 2.6 and 2.7 |
||
---|---|---|
.github | ||
addons | ||
admin | ||
dev | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
BRANCHES | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
SUBVERS | ||
VERDATE | ||
VERSION |
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)