haproxy/addons
Amaury Denoyelle 5000f0b2ef BUG/MINOR: promex: fix server iteration when last server is deleted
Servers iteration via promex is now resilient to server runtime deletion
thanks to the watcher mechanism. However, the watcher was not correctly
initialized which could cause duplicate metrics reporting.

This issue happens when promex dump yielded when manipulating the last
server of a proxy. If this server is removed in parallel, <sv> pointer
will be set to NULL when promex resumes. Instead of switching to another
proxy, the code would reuse the same one and iterate again on the same
server list.

To fix this issue, <sv> pointer must not be reinitialized just after a
resumption point. Instead, this is now performed before
promex_dump_srv_metrics(), or just after switching to another proxy
instance. Thus, on resumption, if promex_dump_srv_metrics() is started
with <sv> as NULL, it means that the server was deleted and the end of
the current proxy list is reached, hence iteration is restarted on the
next proxy instance.

Note that ctx.p[1] does not need to be manually updated at the end of
promex_dump_srv_metrics() as srv_watch already does that.

This patch must be backported up to 3.0.
2026-02-26 18:24:36 +01:00
..
51degrees BUILD: 51d: fix build issue with recent compilers 2022-12-15 19:36:13 +01:00
deviceatlas CLEANUP: deviceatlas: add unlikely hints and minor code tidying 2026-02-14 15:49:00 +01:00
ot MEDIUM: stream: Map task wake up reasons to dedicated stream events 2025-01-28 14:53:37 +01:00
promex BUG/MINOR: promex: fix server iteration when last server is deleted 2026-02-26 18:24:36 +01:00
wurfl LICENSE: wurfl: clarify the dummy library license. 2022-12-02 05:32:46 +01:00