Details
Description
The initial handshake of a server connection contains the first isMaster response and associated RTT for a server. Right now this is done here, but the results of the isMaster response and RTT are not accessible outside of this class.
We need to be able to create the initial ServerDescription for a server from the isMaster response and RTT from this initial handshake. This ensures that a server that is added to the topology is always potentially available to be included in server selection.
Note that after this initial handshake the RTT for a server will be updated from the "ServerMonitor" component being developed in SERVER-45051.
The relevant part of the spec is here.
Implementation plan:
Create a new NetworkConnectionHook::validateHost override to be passed in when creating the NetworkInterface in ReplicaSetMonitorManager::_setupTaskExecutorInLock. This hook will first find which RSM the host belongs to and then will use the isMaster response to publish a new event onServerHandshakeCompleted. There will be a new function on the RSM onServerHandshakeCompleted that uses the isMaster response to call TopologyManager::onServerDescription.
Attachments
Issue Links
- is depended on by
-
SERVER-46465 Add onServerHandshakeCompleteEvent handler in streamable RSM
-
- Closed
-