Skip to content

v2.26.6

Choose a tag to compare

@bpacholek bpacholek released this 13 Oct 16:21
· 50 commits to main since this release

Patch release.

Fixed

A lame-duck failover whose reconnect is refused authentication now reports the refusal once to the errorListener and the error log (#201). Before, the reconnect reported the AuthenticationException and then the failover reported the same object again, so metrics or alerting built on the listener counted it twice. This happened on both failover paths: inline for your own read, and in the failover's own fiber for an operation's read (#191). It also happened when the failover joined another fiber's recovery.

Who should upgrade: anyone who counts or alerts on errorListener reports and connects with credentials the servers may refuse during a lame-duck failover. There are no API changes.

Before upgrading

  • "Reconnect attempts exhausted" from a failover that gives up is still reported once. The reconnect does not report that one itself, so the failover's report is the only one.
  • The Closed event, its error and the stop after a refusal are unchanged. The event still carries the refusal, and the connection does not retry after it.
  • Separate refusals are still reported separately. For example, two refusals after reopening the connection give two reports, even with identical messages.

Quality gates

  • PHPStan level 8.
  • 3607 unit tests (with data sets) on PHP 8.2 to 8.5, 159 live integration tests and 49 Behat scenarios. All runnable examples pass.
  • codecov/patch 100%: every changed line is covered. Total coverage 99.04%.
  • Infection covered MSI 92.4% (90% floor enforced in CI). It skipped 5765 of the 8842 mutants it generated as too slow, so the score does not include them. No mutant escaped in the changed lines.
  • New LameDuckAuthenticationReportingTest, 16 cases, 12 of which fail on 2.26.5.
  • Six broken variants of the fix were tried, and each one fails cases: either catch fixed alone, a guard that swallows every failure or that keys on the parent ConnectionException, and moving the report out of the reconnect instead.

The full record is in the CHANGELOG.