Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45230

RTT and isMaster from initial handshake should populate initial ServerDescription record

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • None
    • None
    • None
    • Fully Compatible
    • v4.4
    • Service Arch 2020-01-13, Service Arch 2020-02-24, Service Arch 2020-03-09

    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

        Activity

          People

            janna.golden@mongodb.com Janna Golden
            lamont.nelson@mongodb.com Lamont Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: