Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-829

Call ismaster on each new connection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.0
    • None
    • None
    • Fully Compatible

    Description

      Call ismaster on each new connection and store the results on the SocketInfo instance.

      The upcoming Authentication Spec says:

      If credentials exist, upon opening a socket, drivers MUST send an isMaster command immediately. This allows a driver to determine whether the server is an Arbiter.

      Calling ismaster additionally allows the driver to know if the default authentication method for each socket is MONGODB-CR or SCRAM-SHA-1, avoiding races when the driver repopulates the pool after a disconnect.

      In theory we could choose not to call ismaster if there are no credentials, but it's simpler always to call ismaster, and paves the way for future breaking changes to the wire protocol besides the current breaking change to authentication.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: