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

Assert in invalid topology in load balanced mode topology closed callback

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.19.2
    • Affects Version/s: None
    • Component/s: None
    • None

      Background & Motivation

      This assertion is hit in mongoc_client_pool_destroy under these conditions:

      • The topology type is LoadBalanced
      • The topology description fails to add the LoadBalancer server.
      • A TopologyClosed callback is set.

      CDRIVER-4145 fixed a similar assertion on the TopologyOpening event. The solution was to not emit a TopologyOpening event if the topology is marked invalid (i.e. a failure to resolve any hosts, or invalid options applied through TXT lookup).

      Reproducing

      This can be reproduced by modifying the _test_dns_maybe_pooled function to set a topology closed callback with mongoc_apm_set_topology_closed_cb and running the test loadBalanced-replicaSet-errors.

      Scope
      Do not emit a TopologyClosed event if the topology is marked invalid. A TopologyOpening event is already not emitted in this case.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: