Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2426

Make fewer copies of the MongoDB URI

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, uri
    • Labels:
      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 Unassigned
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: