[SERVER-45230] RTT and isMaster from initial handshake should populate initial ServerDescription record Created: 18/Dec/19  Updated: 08/Jan/24  Resolved: 05/Mar/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: New Feature Priority: Major - P3
Reporter: Lamont Nelson Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-46465 Add onServerHandshakeCompleteEvent ha... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Service Arch 2020-01-13, Service Arch 2020-02-24, Service Arch 2020-03-09
Participants:

 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.



 Comments   
Comment by Githook User [ 29/Mar/20 ]

Author:

{'name': 'jannaerin', 'username': 'jannaerin', 'email': 'golden.janna@gmail.com'}

Message: SERVER-45230 Rtt and isMaster from initial handshake should populate initial server description

(cherry picked from commit b74fd5ae11cb95a42cf18e996e81136546cfddda)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c55de0f4f4f8af1d1c97c44d2aeb7f97daca9c21

Comment by Githook User [ 04/Mar/20 ]

Author:

{'username': 'jannaerin', 'name': 'jannaerin', 'email': 'golden.janna@gmail.com'}

Message: SERVER-45230 Rtt and isMaster from initial handshake should populate initial server description
Branch: master
https://github.com/mongodb/mongo/commit/b74fd5ae11cb95a42cf18e996e81136546cfddda

Generated at Thu Feb 08 05:08:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.