-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.2.2
-
Component/s: Connectivity
-
None
-
Fully Compatible
When server connection times out, an unobserved task exception is thrown, even when synchronous API is used (see stack trace below).
We have a handler for such exceptions installed globally (from the days when such exceptions terminated current AppDomain), so we occasionally get these traced when servers get down. While they are mostly harmless, I believe these exceptions should be handled and (probably) muted.
at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelper(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Connections.BinaryConnection.Open(CancellationToken cancellationToken)
at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquiredConnection.Open(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Servers.ClusterableServer.GetChannel(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Bindings.ServerChannelSource.GetChannel(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Bindings.ChannelSourceHandle.GetChannel(CancellationToken cancellationToken)
at MongoDB.Driver.Core.Operations.CountOperation.Execute(IReadBinding binding, CancellationToken cancellationToken)
at MongoDB.Driver.OperationExecutor.ExecuteReadOperation[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, CancellationToken cancellationToken)
at MongoDB.Driver.MongoCollectionImpl`1.Count(FilterDefinition`1 filter, CountOptions options, CancellationToken cancellationToken)