From: Amaury Denoyelle Date: Tue, 21 Jul 2026 09:38:12 +0000 (+0200) Subject: MINOR: proxy: stress CLI commands with backends/servers loop X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/static/$%7BGITURL%7D$%7Bcid%7D?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=haproxy.git MINOR: proxy: stress CLI commands with backends/servers loop Update handlers for "show backend" and "show servers state/conn" so that stress mode can be used to force the task yielding each time a new instance is dumped. This is useful for debugging commands safety with backend/server deletion in parallel. --- diff --git a/src/proxy.c b/src/proxy.c index 62b45b8c1..e69d8afdd 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -4560,7 +4561,8 @@ static int dump_servers_state(struct appctx *appctx) chunk_appendf(&trash, "\n"); } - if (applet_putchk(appctx, &trash) == -1) { + if (STRESS_RUN1(applet_putchk_stress(appctx, &trash) == -1, + applet_putchk(appctx, &trash) == -1)) { return 0; } } @@ -4638,8 +4640,10 @@ static int cli_io_handler_show_backend(struct appctx *appctx) continue; chunk_appendf(&trash, "%s\n", curproxy->id); - if (applet_putchk(appctx, &trash) == -1) + if (STRESS_RUN1(applet_putchk_stress(appctx, &trash) == -1, + applet_putchk(appctx, &trash) == -1)) { return 0; + } } return 1;