mirror of https://github.com/sysown/proxysql
fast_forward_grace_close-t writes a binlog, then for each target_time in
{0..7, 20, 30, 60} reads it via a throttled client and asserts that
target_time <= 8s reaches EOF and target_time > 8s does not (because the
8s grace_close_ms should cut the session before the binlog is drained).
The >8s iterations have been flaky on GitHub runners. Analysis of the
actual CI logs (proxysql.log timestamps vs test TAP output) shows what
goes wrong: during the 8s grace window, ProxySQL keeps pushing bytes
into the client's kernel recv buffer as fast as the buffer accepts them.
If the whole binlog — including the empty-event EOF marker — fits into
"what the client has already read" + "what is sitting in the client's
recv buffer" by t=8s, grace_close does fire and cut the session, but
the client's next mysql_binlog_fetch just returns the already-buffered
EOF event and reports reached_EOF=TRUE. The test then fails the
"Expected FALSE" assertion.
With total_bytes = N and client recv-buffer capacity R, the test is
only robust when N > ~1.7*R. Prior bumps (3 events -> 50 events,
2026-04-13) lifted N from 150 KB to 2.5 MB, which is enough on
dbdeployer but too close to the margin on GH runners whose TCP recv
autotune can grow past a couple of MB.
1000 x 50 KB = ~50 MB puts N well above any realistic R (kernels cap
autotune around a few MB), so the grace close always fires while there
is still many MB of undelivered binlog sitting in ProxySQL's output
queue — the client cannot reach EOF.
Side effects on other tests: none. The only other binlog-reading test
in the same group, fast_forward_switch_replication_deprecate_eof-t, is
already incidentally reading grace_close's binlog (it picks the first
file from SHOW BINARY LOGS, which ends up being grace_close's rotated
file). It reads at full speed and only asserts reached_EOF==true,
which stays correct — it just reports ~50 MB instead of ~2.5 MB in its
informational TAP message. Full-speed read of 50 MB over the Docker
bridge is sub-second per config (4 configs -> ~1-2 s added). Data
generation cost at test start is ~1-2 s for the extra INSERTs.
fix/pgsql-active-tx-on-broken-conn
parent
8da7a71a44
commit
e24ac092f6
Loading…
Reference in new issue