fix: harden graceful-failover checks found in verify

hang-key names its trigger per run, turns SIGTERM and SIGHUP into an
interrupt so the trigger is always dropped and the replica unpaused, and
prints the cleanup SQL if dropping fails. idle-conns reports who closed
the idle connections and can read the pool of another LB container, so a
variant LB config can be checked against the same replicas. bench_compare
refuses a label measured without the load balancer. Stale numbers removed
from the haproxy.cfg comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 00:00:54 +03:00
co-authored by Claude Opus 5.5
parent 4234df5767
commit 12783aaff1
6 changed files with 106 additions and 29 deletions
+14
View File
@@ -138,6 +138,20 @@ def methodology(label: Label) -> dict[str, Any]:
def check_methodology(first: Label, second: Label) -> list[str]:
"""Отказ при различии; возвращает параметры, записанные в одной метке."""
a, b = methodology(first), methodology(second)
# с change graceful-failover в пути запроса стоит HAProxy, и паспорт
# пишет число реплик; метка без него снята мимо LB — другая методика
# (решение 6 design change graceful-failover), а не «параметр
# записан только в одной метке»
without_lb = [
label.name
for label, flat in ((first, a), (second, b))
if "limits.api_replicas" not in flat
]
if len(without_lb) == 1:
raise CompareError(
f"label {without_lb[0]} was measured without the load balancer "
"(before change graceful-failover): different methodology",
)
differs = [
f"{key}: {first.name} = {a[key]!r}, {second.name} = {b[key]!r}"
for key in sorted(a.keys() & b.keys())