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

MongoClient should raise an error when given multiple URIs

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Unknown
    • Resolution: Fixed
    • None
    • 4.0
    • None
    • None

    Description

      MongoClient should raise an error when given multiple URIs. Currently the behavior is to parse all the URIs and combine all the hosts which doesn't make sense. A single MongoClient can only connect to a single cluster, passing multiple cluster URIs like this should raise an error:

      MongoClient(host=[
          "mongodb+srv://cluster-a.abc12.mongodb.net",
          "mongodb+srv://cluster-b.abc12.mongodb.net",
          "mongodb+srv://cluster-c.abc12.mongodb.net"])
      

      Attachments

        Activity

          People

            julius.park@mongodb.com Julius Park
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: