Repository navigation
Open
Description
Several recent reports share one root: the client's record of a subscription changes without the server's acknowledgement. This issue tracks what remains after the individual fixes.
Fixed or in review:
- Duplicate Pub/Sub messages after Redis Sentinel failover #3336 overlapping restores register on two servers - Pub/sub: overlapping subscription restores cannot register on two servers #3353
- Pub/Sub: a subscribe racing the last unsubscribe of the same channel can be silently orphaned #3362 a subscribe racing the last unsubscribe is orphaned - Pub/Sub: don't orphan a subscribe that races the last unsubscribe of the same channel #3363
- multi-node subscriptions dropping connected nodes - Pub/sub: a multi-node subscription forgets its disconnected nodes, not its connected ones #3374
Outstanding:
- Unsubscribe while a subscribe is unacknowledged. No unsubscribe is sent, because no server is recorded yet; when the ack lands the server stays subscribed. Found by @vkyow in Fix duplicate Pub/Sub subscription restoration after Sentinel failover #3337. Acceptance tests: the four in-flight scenarios from that PR (
UnsubscribeWaitsForAnInFlightSubscribe,TimedOutSynchronousUnsubscribeStillDetachesThePendingSubscription,UnsubscribeAllContinuesPastAnInFlightSubscription,LateCleanupDoesNotUnsubscribeTheReplacementOwner), which fail onmainand on Pub/sub: overlapping subscription restores cannot register on two servers #3353. - An unsubscribe the server declined (
BUSY,LOADING, ...) leaves it subscribed - Pub/Sub: a failed unsubscribe of the last handler leaves the server subscribed while the client forgets it #3367. Acceptance tests:FailedUnsubscribeUnitTestsfrom Pub/Sub: retry a last unsubscribe the server declined, rather than leaving it subscribed #3368. - A failed cleanup of a stray subscription leaves duplicate delivery until reconnect. No test yet. A delivery filter by owning connection (as in Fix duplicate Pub/Sub subscription restoration after Sentinel failover #3337) is one option, at the cost of failing closed.
- Brief duplicate delivery when a user subscribe overlaps an internal restore. Probably acceptable; to be documented.
Proposed direction for 1 and 2: an explicit "retiring" state on the subscription, honoured by the ack and restore paths and driven by the existing heartbeat, so the client keeps a record until the server confirms.
Separate, not part of this: #3357 (publish pinned to the subscribed endpoint).
Metadata
Metadata
Assignees
Labels
No labels
Activity
Pub/sub: a subscribe acknowledged after its subscription was retired …
Pub/Sub: track retiring subscriptions and drive cleanup via ack, rest…