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

MongoClient should perform SRV resolution lazily

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • 4.11
    • Affects Version/s: None
    • Component/s: SDAM
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      MongoClient currently performs the SRV+TXT resolution directly in the constructor. The downside is that if the SRV or TXT lookup fails due to a transient DNS error then the entire client fails to be created.

      MongoClient should perform SRV resolution lazily to make it more robust. If the SRV resolution consistently fails, then the first operation should raise an informative server selection error indicating the SRV/TXT error.

      I'm thinking we can defer the initial SRV/TXT lookup to the client's background thread.

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: