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

Call ismaster on each new connection

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      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.

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

              Created:
              Updated:
              Resolved: