[CSHARP-3966] Consider redesign MongoDefaults Created: 12/Nov/21  Updated: 18/Dec/23

Status: Backlog
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.0

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Implement 3.0 release
Quarter: FY24Q4
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Currently MongoDefaults is available only on the Driver level which makes unavailable to get these values on the Core level. The Core analog for this class is MongoInternalDefaults. The Bson level has his own class as well.

Also, the above classes are public(except of MongoInternalDefaults) and mutable which has no a lot of sense since the default values are not supposed to be changed. We should define how we should handle this behavior.

Options that we discussed:

  1. Remove `MongoInternalDefaults` and move MongoDefaults on the Core level which will make it available everywhere on Core and higher levels
    1. In this approach, we can consider formatting like grouping all consts by purpose to the nested classes like: Defaults.SDAM.XXXDefaults.CMAP.XXX
  2. Remove all these classes and instead place these values as consts into appropriated setting classes. For example: connection pool related properties can be put into ConnectionPoolSettings

Regardless the taken solution, the new approach should be internal and not be exposed for users. Additionally it makes sense to mark current classes with default settings as obsolete


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