Repository navigation
v2.26.0
Minor release. One of the library's operations whose read starts a reconnect, or brings the lame-duck INFO that starts a failover, is now let go as soon as the reconnect is over (#202). It no longer waits for the Reconnected listener, or for the delivery of what the reconnect read. A slow listener, or a slow handler of a lower sid in that delivery, used to make such an operation time out although its result was already there:
- a
SubscriptionQueuepoll's message was queued - a
request()'s reply was on the new socket, and was lost - a fetch's messages came back only after
ack_wait
Upgrading is recommended if your Reconnected listener does real work, such as re-registering state or warming caches, or if a subscription handler can await for a while. There are no API changes. What changes:
- The initiating operation is let go when the reconnect is over, at the same point as the operations that joined it: after the handshake, the subscription replay, the reply inbox's confirmation and the flush of buffered publishes. It then looks again: a poll takes what the reconnect read for its subscription, and a request reads its reply on the new socket.
- The listener and the delivery go on in the reconnect's fiber. A listener can no longer count on the operation whose read started the reconnect having waited for it.
- Unchanged: your own
processIncoming()andreadIncoming(), a serving loop's read, the heartbeat, and an operation whose write started the reconnect still wait for all of it. A deadline or a wake-up still ends only the operation's wait, and failed recoveries keep their errors. - Boundary: a request's reply already queued on the shared request inbox behind a slow handler of a lower sid still waits for that handler.
Quality gates
- PHPStan level 8.
- 3449 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/patch100%: every changed line is covered. Total coverage 99.03%.- Infection covered MSI 92.5% (90% floor enforced in CI). It skipped 4774 of the 8802 mutants it generated as too slow, so the score does not include them. No mutant escaped in the changed recovery code.
- New
OperationRecoveryCompletionTest, 13 cases: 8 fail on 2.25.10, and 5 are guards (joiners, an application read that still waits). Six broken variants of the fix each fail targeted cases, including the issue's mutation check: without the fallback for a skipped stale recovery, the request is parked until its deadline.
The full record is in the CHANGELOG.