[CSHARP-3964] Consider the range of possible client exceptions that should be resumable Created: 10/Nov/21  Updated: 27/Feb/23

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

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

Issue Links:
Issue split
split from CSHARP-3963 MongoConnectionPoolPausedException sh... Closed

 Description   

The change stream spec says that:

Any error encountered which is not a server error (e.g. a timeout error or network error)

should be resumable.

Currently we add only particular exceptions to the list of resumable exceptions. We should consider making all exceptions that are inherited from MongoClientException resumable. It may require additional changes to exclude exceptions like "MongoConfigurationException" (that's clearly not resumable) from this logic. One of solution here might be adding a new field like IsRetryable=true on MongoClientException level that we will be able to override in children.

Additionally, we should consider replacing some of .net exceptions that we throw in the code on new ones inherited from MongoClientException that in turns also will be resumable. For example, we throw ObjectDisposedException if we try to call any method from the disposed server, but the server can be disposed by cluster at any moment for example because replica set reconfiguration. And in this case if this disposed server was pinned by any logic for example a created cursor, the pinned server will throw ObjectDisposedException during usage that won't be resumable

 



 Comments   
Comment by James Kovacs [ 22/Feb/23 ]

Hi, sam.kovacic@gogtp.com,

Thank you for reaching out to us about this issue. We will be considering possible improvements to this behaviour. It would be helpful for us if you could provide some additional details about your use case. You mentioned seeing these pool paused exceptions daily. Does this happen more frequently with certain operations? During times of heavy load? During maintenance (such as cluster size autoscaling on Atlas)? Any additional details that you can provide will assist us in helping to ensure that any changes improve the behaviour with your use case.

Sincerely,
James

Comment by Sam Kovacic [ 17/Feb/23 ]

We regularly (daily) get the exception using the C# driver: "the connection pool is in paused state for server...". Please fix ASAP!!!!

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