You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the two-direction reference between connection and packing protocol.
Background:
A connection holds a socketClient. A socketClient has a protocol which specifies what protocol version the driver should work on.
When a connection is created in a pool, the connection will first be `started` (where the socketClient will negotiate protocol version with the server) and then `initialized` (where the server version will be sent back).
Problem description:
The problem that we need to solve here is that for 3.2+ servers, the protocol the driver is working on should allow bytes, while for server version lower than 3.2.0, the protocol should disallow bytes to be sent to prevent from crashing server connection in a bad way. While the server version is only known after the protocol is created, so after the server version arrived the protocol need either be updated (this commit) or the protocol need to be informed (previous impl).
Solution:
This commit changed the behaviour in connection to update protocol regarding bytes support right after server version is received. By doing in this way we avoid some two-direction reference between connection and protocol.
0 commit comments