[CDRIVER-4137] Client shutdown does not emit ServerClosedEvents Created: 20/Aug/21 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
Background & Motivation libmongoc does not call a callback registered with mongoc_apm_set_server_closed_cb when a mongoc_client_t or mongoc_client_pool_t is destroyed. This appears to contradict the SDAM Monitoring specification's definition os ServerClosedEvent
libmongoc does emit the ServerClosedEvent in the following situations: This can be observed with example-sdam-monitoring.
Scope Use _mongoc_topology_description_monitor_server_closed to emit a ServerClosedEvent for each server being monitored when a mongoc_client_t or mongoc_client_pool_t is being destroyed. Add tests to ensure server closed events are emitted. This may not be necessary if DRIVERS-1087 is complete before this ticket. SPEC-1280 proposes adding specification tests to test this behavior. |