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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user