-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- is related to
-
CDRIVER-4145 Do not start background monitoring when topology is invalid
- Closed
- related to
-
CDRIVER-4254 Prohibit construction of invalid topology in mongoc_topology_new
- Backlog