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

Prohibit construction of invalid topology in mongoc_topology_new

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, SDAM
    • None

      After CDRIVER-3723, it will no longer be possible to construct a client or pool with an invalid topology (i.e. SRV lookup or URI finalization failed). Previously, clients and pools could be created with an invalid topology and errors would not be relayed until the first instance of server selection.

      Consider refactoring mongoc_topology_new to take an optional bson_error_t and return NULL if the topology would be considered invalid.

      Once it is no longer possible to construct an invalid topology, checks for topology->valid (e.g. 2d94467 from CDRIVER-4184) can also be removed.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: