Make fewer copies of the MongoDB URI

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, uri
    • Not Needed
    • 🔵 Done
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      The cause of CDRIVER-2425 is that we have too many copies of the MongoDB URI: the client pool, the client, the topology, and the cluster all have copies. MongoDB URIs are mutable. Specifically if mongoc_topology_new receives a mongodb+srv URI, it updates its URI struct with the results of a DNS lookup, but the client's copy of the URI isn't updated.

      Refactor to reduce the number of copies and reduce the likelihood that one part of the code uses an inconsistent copy of the URI from another part of the code.

            Assignee:
            Unassigned
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: