[CDRIVER-4078] Make server description immutable Created: 14/Jul/21 Updated: 15/Apr/22 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | 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 | ||
| Epic Link: | CDRIVER-4107 |
| Description |
|
Background & Motivation Server descriptions are used throughout the codebase. They have been the source of several bugs. I believe making server descriptions immutable would help maintainability.
Confusing error processing in mongoc_server_description_handle_hello is the cause of CDRIVER-3696. SDAM currently recommends treating a server description as immutable:
Scope
Investigate whether removing the struct definition of mongoc_server_description_t from mongoc-server-description-private.h would be helpful. Investigate what new internal API we would need to for constructing and copying server descriptions. |