Remove reference to control connection in DefaultSession
Description
In theory, the control connection is an implementation detail of the topology monitor and metadata manager. If those components are overridden with custom versions that use another way to get the data, the rest of the driver should be able to function without initializing the control connection at all.
This is currently not the case: DefaultSession references the control connection, in order to reconnect if the protocol version was downgraded.
We should probably abstract that behind a new TopologyMonitor method, for example reinit(). I'm not sure how to preserve the needsSchemaRefresh mechanism, but maybe it doesn't matter (a protocol version downgrade should normally be pretty rare, and refreshing the schema twice is not a big deal either).
In theory, the control connection is an implementation detail of the topology monitor and metadata manager. If those components are overridden with custom versions that use another way to get the data, the rest of the driver should be able to function without initializing the control connection at all.
This is currently not the case:
DefaultSession
references the control connection, in order to reconnect if the protocol version was downgraded.We should probably abstract that behind a new
TopologyMonitor
method, for examplereinit()
. I'm not sure how to preserve theneedsSchemaRefresh
mechanism, but maybe it doesn't matter (a protocol version downgrade should normally be pretty rare, and refreshing the schema twice is not a big deal either).