[CDRIVER-3909] Implement API for copying and destroying mongoc_topology_description_t objects Created: 17/Feb/21  Updated: 28/Oct/23  Resolved: 16/Aug/21

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.20.0

Type: Improvement Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPC-1891 Implement TopologyDescription class Closed
Backwards Compatibility: Fully Compatible

 Description   

Currently, the topology description libmongoc provides to event listeners is (a) owned by libmongoc and (b) is freed when control is returned the libmongoc. With server descriptions (provided to other SDAM events), listeners have the ability to copy/destroy those objects; however, this is not the case with topology descriptions.

PHPC-1150 needs such an API to fully implement SDAM monitoring, since its event objects may outlive the listener function.



 Comments   
Comment by Githook User [ 16/Aug/21 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-3909 topology description copy/destroy methods (#785)

  • Rename mongoc_topology_description_destroy to cleanup
  • Use consistent language in server description copy/destroy docs

Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d2838038aa7d1808b872ea7bd39df33db5bba364

Comment by Jeremy Mikola [ 18/May/21 ]

Quoting the PR:

This can be reviewed, but I'll hold off on merging until I'm confident that the API will work for PHPC-1150.

Comment by Jeremy Mikola [ 23/Apr/21 ]

https://github.com/mongodb/mongo-c-driver/pull/785

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