[CDRIVER-2426] Make fewer copies of the MongoDB URI Created: 12/Dec/17  Updated: 07/Mar/23

Status: Backlog
Project: C Driver
Component/s: libmongoc, uri
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-2425 authSource option from TXT record ign... Closed

 Description   

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.


Generated at Wed Feb 07 21:15:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.