Skip to content

RESP3→RESP2 reconnect can replay SUBSCRIBE  onto the interactive connection, permanently poisoning it #3154

Description

@sspeaks

If a client initially connects via RESP3 protocol and then a reconnect is forced (say via a failover) and the reconnect HELLO fails for some reason (timeout due to connection flood, token expiry, etc), the proto is never parsed, and SE.R will send AUTH and CLIENT SETNAME/etc without ever setting proto — the tracer at the end of the handshake then sees no protocol was set and assigns RESP2. When it does so it creates a separation of the interactive/subscribe bridges, just as is needed for RESP2. However, any SUBSCRIBE (from  EnsureSubscriptions ) commands that were pushed onto the interactive bridge queue during the disconnect will still be sent to the interactive bridge, poisoning it against any subsequent GET/SET etc commands.

I imagine the fix is just making sure on such a reconnect downgrade, any queued subscription commands are moved to the subscription bridge?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions