[CSHARP-3431] Make MongoClient IDisposable to allow short lifetime scope usage Created: 18/Feb/21 Updated: 15/Jan/24 |
|
| Status: | Scheduled |
| Project: | C# Driver |
| Component/s: | Configuration |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Mikalai Mazurenka (Inactive) | Assignee: | Boris Dogadov |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | size-xlarge | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Epic Link: | Implement 3.0 release | ||||||||||||||||||||||||||||
| Quarter: | FY24Q4 | ||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||||||||||||||
| Description |
|
According to existing implementation the general advice on MongoClient usage is singleton lifetime scope. Lately several small issues (e.g. CSHARP-3424) arose which require per-instance use of MongoClient. This lifetime scope will result in excessive memory usage and undisposed resources. These small issues could be mitigated by making MongoClient IDisposable and changing the design accordingly to allow usage with short lifetime scope. |